Use indeterminate for select all
This commit is contained in:
parent
615d825817
commit
1bdf62ab41
|
@ -14,6 +14,7 @@
|
|||
$: updateSelected(selectedBooleans)
|
||||
$: dispatch("change", selected)
|
||||
$: allSelected = selected?.length === options.length
|
||||
$: noneSelected = !selected?.length
|
||||
|
||||
function reset() {
|
||||
return Array(options.length).fill(true)
|
||||
|
@ -48,6 +49,7 @@
|
|||
text={selectAllText}
|
||||
compress
|
||||
lighter
|
||||
indeterminate={!allSelected && !noneSelected}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
Loading…
Reference in New Issue