mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +00:00
remove unassigned social links
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
667e577575
commit
fd303723aa
@ -24,7 +24,7 @@ import { Icon } from '@anticrm/ui'
|
||||
|
||||
import contact from '@anticrm/contact'
|
||||
|
||||
export let value: Channel[]
|
||||
export let value: Channel[] | undefined
|
||||
|
||||
interface Item {
|
||||
label: IntlString,
|
||||
@ -59,7 +59,7 @@ async function update(value: Channel[]) {
|
||||
displayItems = result
|
||||
}
|
||||
|
||||
$: update(value)
|
||||
$: if (value !== undefined) update(value)
|
||||
|
||||
let displayItems: Item[] = []
|
||||
|
||||
|
@ -49,6 +49,9 @@
|
||||
}
|
||||
})
|
||||
|
||||
function filterUndefined(channels: Channel[]): Channel[] {
|
||||
return channels.filter(channel => channel.value !== undefined && channel.value.length > 0)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@ -64,7 +67,7 @@
|
||||
<EditBox label={'Twitter'} placeholder={'@rosychen'} maxWidth={'12.5rem'} />
|
||||
<EditBox label={'Facebook'} placeholder={'facebook/rosamundch'} maxWidth={'12.5rem'} />
|
||||
</div> -->
|
||||
<Button label="Apply" on:click={() => { dispatch('close', newValues) }}/>
|
||||
<Button label="Apply" on:click={() => { dispatch('close', filterUndefined(newValues)) }}/>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
Loading…
Reference in New Issue
Block a user