mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 04:23:58 +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 inline: boolean = false
|
||||
let divScroll: HTMLElement
|
||||
$: _value = value ?? ''
|
||||
</script>
|
||||
|
||||
{#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}
|
||||
<div class="clear-mins max-w-80">
|
||||
<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>
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -60,7 +60,7 @@
|
||||
}}
|
||||
>
|
||||
<svelte:fragment slot="content">
|
||||
{#if value !== undefined}
|
||||
{#if value != null}
|
||||
<span class="caption-color overflow-label pointer-events-none">{value}</span>
|
||||
{:else}
|
||||
<span class="content-dark-color pointer-events-none"><Label label={placeholder} /></span>
|
||||
@ -68,7 +68,7 @@
|
||||
</svelte:fragment>
|
||||
</Button>
|
||||
{:else if readonly}
|
||||
{#if value !== undefined}
|
||||
{#if value != null}
|
||||
<span class="caption-color overflow-label">{value}</span>
|
||||
{:else}
|
||||
<span class="content-dark-color"><Label label={placeholder} /></span>
|
||||
|
Loading…
Reference in New Issue
Block a user