mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-11 17:40:05 -04:00
Update CountryItem.svelte
This commit is contained in:
parent
866ac1b85f
commit
40369e3c4c
1 changed files with 4 additions and 2 deletions
|
@ -11,10 +11,11 @@
|
|||
|
||||
$: hasStreams = channels.filter(c => c.streams > 0)
|
||||
|
||||
$: expanded = country.expanded || (channels && channels.length > 0 && hasQuery)
|
||||
$: intersect = _.intersectionBy($selected, hasStreams, 'id')
|
||||
$: expanded = country.expanded || (hasStreams && hasStreams.length > 0 && hasQuery)
|
||||
$: isSelected = intersect.length === hasStreams.length
|
||||
$: isIndeterminate = intersect.length !== 0 && intersect.length < hasStreams.length
|
||||
$: isDisabled = hasStreams.length === 0
|
||||
$: isSelected = intersect.length === hasStreams.length && hasStreams.length > 0
|
||||
|
||||
function onExpand() {
|
||||
country.expanded = !country.expanded
|
||||
|
@ -44,6 +45,7 @@
|
|||
>
|
||||
<Checkbox
|
||||
selected={isSelected}
|
||||
disabled={isDisabled}
|
||||
indeterminate={isIndeterminate}
|
||||
on:change={onCheckboxChange}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue