Skip to content

Commit

Permalink
Fix filtering on falsy values
Browse files Browse the repository at this point in the history
  • Loading branch information
stnguyen90 committed Oct 30, 2023
1 parent 5facd38 commit d4d9135
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/filters/content.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
// This Map is keyed by tags, and has a query as the value
function addFilter() {
if (column && operator) {
queries.addFilter({ column, operator, value });
queries.addFilter({ column, operator, value: value ?? '' });
value = null;
}
}
Expand All @@ -111,7 +111,7 @@
}
$: isDisabled = (function getDisabled() {
return !operator || (!operator?.hideInput && !value);
return !operator;
})();
</script>

Expand Down

0 comments on commit d4d9135

Please sign in to comment.