1
0
Fork 0
mirror of synced 2024-07-03 05:20:32 +12:00

Make option select component select placeholder option whenever the value is nullish

This commit is contained in:
Andrew Kingston 2021-01-05 11:47:09 +00:00
parent 4ea8b34ff1
commit f94733db05

View file

@ -98,7 +98,7 @@
$: isOptionsObject = options.every(o => typeof o === "object")
$: selectedOption = isOptionsObject
? options.find(o => o.value === value)
? options.find(o => o.value === value || (o.value === "" && value == null))
: {}
$: if (open && selectMenu) {