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 3778589d0f
commit 82baab3d9d
1 changed files with 1 additions and 1 deletions

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) {