mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-05 16:03:47 +00:00
multiselect: handle duplicates (do not allow)
This commit is contained in:
@@ -59,9 +59,6 @@
|
||||
}
|
||||
|
||||
$: if (resolvedConfig.defaultItems) {
|
||||
console.log(resolvedConfig.defaultItems)
|
||||
console.log(findOptionsByValue(resolvedConfig.defaultItems))
|
||||
|
||||
selectOptionsByValue(resolvedConfig.defaultItems)
|
||||
}
|
||||
|
||||
@@ -173,6 +170,10 @@
|
||||
{options}
|
||||
placeholder={resolvedConfig.placeholder}
|
||||
allowUserOptions={resolvedConfig.create}
|
||||
key={(option) => {
|
||||
if (typeof option == 'string' || typeof option == 'number') return option
|
||||
return option.value
|
||||
}}
|
||||
on:change={(event) => {
|
||||
if (event?.detail?.type === 'removeAll') {
|
||||
outputs?.result.set([])
|
||||
|
||||
Reference in New Issue
Block a user