mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-13 18:40:06 -04:00
Update CountryItem.svelte
This commit is contained in:
parent
40369e3c4c
commit
3a0b23836a
1 changed files with 4 additions and 4 deletions
|
@ -6,12 +6,12 @@
|
||||||
import { fade } from 'svelte/transition'
|
import { fade } from 'svelte/transition'
|
||||||
|
|
||||||
export let country
|
export let country
|
||||||
export let channels = []
|
export let channels
|
||||||
export let hasQuery
|
export let hasQuery
|
||||||
|
|
||||||
$: hasStreams = channels.filter(c => c.streams > 0)
|
$: countryChannels = Array.isArray(channels) ? channels : []
|
||||||
|
$: hasStreams = countryChannels.filter(c => c.streams > 0)
|
||||||
$: expanded = country.expanded || (channels && channels.length > 0 && hasQuery)
|
$: expanded = country.expanded || (countryChannels && countryChannels.length > 0 && hasQuery)
|
||||||
$: intersect = _.intersectionBy($selected, hasStreams, 'id')
|
$: intersect = _.intersectionBy($selected, hasStreams, 'id')
|
||||||
$: isIndeterminate = intersect.length !== 0 && intersect.length < hasStreams.length
|
$: isIndeterminate = intersect.length !== 0 && intersect.length < hasStreams.length
|
||||||
$: isDisabled = hasStreams.length === 0
|
$: isDisabled = hasStreams.length === 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue