1
0
Fork 0
mirror of synced 2024-07-06 15:00:49 +12:00

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
}