adjust filters
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
export default class extends HTMLElement {
|
||||
connectedCallback () {
|
||||
this.dateFrom = this.dataset.fromValue
|
||||
this.dateTo = this.dataset.toValue
|
||||
this.dateFromInput = document.getElementById(this.dataset.fromId)
|
||||
this.dateToInput = document.getElementById(this.dataset.toId)
|
||||
|
||||
this.button.addEventListener('click', () => {
|
||||
this.dateFromInput.value = this.dateFrom || ''
|
||||
this.dateToInput.value = this.dateTo || ''
|
||||
this.fromInput.value = this.dataset.fromValue || ''
|
||||
this.toInput.value = this.dataset.toValue || ''
|
||||
})
|
||||
}
|
||||
|
||||
get button () {
|
||||
return this.querySelector('button')
|
||||
}
|
||||
|
||||
get fromInput () {
|
||||
return document.getElementById(this.dataset.fromId)
|
||||
}
|
||||
|
||||
get toInput () {
|
||||
return document.getElementById(this.dataset.toId)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user