Remove log and account for onEmptyFilter in grid button

This commit is contained in:
Andrew Kingston 2023-08-21 16:53:09 +01:00
parent 86c9e2a192
commit 59559ee93c
2 changed files with 2 additions and 15 deletions

View File

@ -15,6 +15,7 @@
$: tempValue = filters || []
$: schemaFields = Object.values(schema || {})
$: text = getText(filters)
$: selected = tempValue.filter(x => !x.onEmptyFilter)?.length > 0
const getText = filters => {
const count = filters?.filter(filter => filter.field)?.length
@ -22,13 +23,7 @@
}
</script>
<ActionButton
icon="Filter"
quiet
{disabled}
on:click={modal.show}
selected={tempValue?.length > 0}
>
<ActionButton icon="Filter" quiet {disabled} on:click={modal.show} {selected}>
{text}
</ActionButton>
<Modal bind:this={modal}>

View File

@ -354,14 +354,6 @@ export default class DataFetch {
const entries = Object.entries(newOptions || {})
for (let [key, value] of entries) {
if (JSON.stringify(value) !== JSON.stringify(this.options[key])) {
console.log(
key,
"is different",
"new",
value,
"vs old",
this.options[key]
)
refresh = true
break
}