mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
UBER-383: fix null/undefined for URI and numbers (#3359)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
f05d817a7c
commit
36b7014327
@ -19,14 +19,15 @@
|
|||||||
export let value: string
|
export let value: string
|
||||||
export let inline: boolean = false
|
export let inline: boolean = false
|
||||||
let divScroll: HTMLElement
|
let divScroll: HTMLElement
|
||||||
|
$: _value = value ?? ''
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if inline}
|
{#if inline}
|
||||||
<a href={value} target="_blank" rel="noreferrer" class="select-text">{value}</a>
|
<a href={value} target="_blank" rel="noreferrer" class="select-text">{_value}</a>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="clear-mins max-w-80">
|
<div class="clear-mins max-w-80">
|
||||||
<ScrollerBar bind:scroller={divScroll}>
|
<ScrollerBar bind:scroller={divScroll}>
|
||||||
<a href={value} target="_blank" rel="noreferrer" class="select-text">{value}</a>
|
<a href={value} target="_blank" rel="noreferrer" class="select-text">{_value}</a>
|
||||||
</ScrollerBar>
|
</ScrollerBar>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<svelte:fragment slot="content">
|
<svelte:fragment slot="content">
|
||||||
{#if value !== undefined}
|
{#if value != null}
|
||||||
<span class="caption-color overflow-label pointer-events-none">{value}</span>
|
<span class="caption-color overflow-label pointer-events-none">{value}</span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="content-dark-color pointer-events-none"><Label label={placeholder} /></span>
|
<span class="content-dark-color pointer-events-none"><Label label={placeholder} /></span>
|
||||||
@ -68,7 +68,7 @@
|
|||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
</Button>
|
</Button>
|
||||||
{:else if readonly}
|
{:else if readonly}
|
||||||
{#if value !== undefined}
|
{#if value != null}
|
||||||
<span class="caption-color overflow-label">{value}</span>
|
<span class="caption-color overflow-label">{value}</span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="content-dark-color"><Label label={placeholder} /></span>
|
<span class="content-dark-color"><Label label={placeholder} /></span>
|
||||||
|
Loading…
Reference in New Issue
Block a user