mirror of
https://github.com/iptv-org/epg
synced 2025-12-18 03:16:53 -05:00
21 lines
397 B
JavaScript
21 lines
397 B
JavaScript
|
|
document.addEventListener('alpine:init', () => {
|
||
|
|
Alpine.data('list', () => ({
|
||
|
|
isLoading: true,
|
||
|
|
query: '',
|
||
|
|
_query: '',
|
||
|
|
items: [],
|
||
|
|
|
||
|
|
search() {
|
||
|
|
this._query = this.query.toLowerCase()
|
||
|
|
},
|
||
|
|
|
||
|
|
async init() {
|
||
|
|
this.items = await fetch('_items.json')
|
||
|
|
.then(response => response.json())
|
||
|
|
.catch(console.log)
|
||
|
|
|
||
|
|
this.isLoading = false
|
||
|
|
}
|
||
|
|
}))
|
||
|
|
})
|