Remove log and account for onEmptyFilter in grid button
This commit is contained in:
parent
86c9e2a192
commit
59559ee93c
|
@ -15,6 +15,7 @@
|
||||||
$: tempValue = filters || []
|
$: tempValue = filters || []
|
||||||
$: schemaFields = Object.values(schema || {})
|
$: schemaFields = Object.values(schema || {})
|
||||||
$: text = getText(filters)
|
$: text = getText(filters)
|
||||||
|
$: selected = tempValue.filter(x => !x.onEmptyFilter)?.length > 0
|
||||||
|
|
||||||
const getText = filters => {
|
const getText = filters => {
|
||||||
const count = filters?.filter(filter => filter.field)?.length
|
const count = filters?.filter(filter => filter.field)?.length
|
||||||
|
@ -22,13 +23,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ActionButton
|
<ActionButton icon="Filter" quiet {disabled} on:click={modal.show} {selected}>
|
||||||
icon="Filter"
|
|
||||||
quiet
|
|
||||||
{disabled}
|
|
||||||
on:click={modal.show}
|
|
||||||
selected={tempValue?.length > 0}
|
|
||||||
>
|
|
||||||
{text}
|
{text}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
<Modal bind:this={modal}>
|
<Modal bind:this={modal}>
|
||||||
|
|
|
@ -354,14 +354,6 @@ export default class DataFetch {
|
||||||
const entries = Object.entries(newOptions || {})
|
const entries = Object.entries(newOptions || {})
|
||||||
for (let [key, value] of entries) {
|
for (let [key, value] of entries) {
|
||||||
if (JSON.stringify(value) !== JSON.stringify(this.options[key])) {
|
if (JSON.stringify(value) !== JSON.stringify(this.options[key])) {
|
||||||
console.log(
|
|
||||||
key,
|
|
||||||
"is different",
|
|
||||||
"new",
|
|
||||||
value,
|
|
||||||
"vs old",
|
|
||||||
this.options[key]
|
|
||||||
)
|
|
||||||
refresh = true
|
refresh = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue