Skip to content

Commit

Permalink
fix: disable/enable filter
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed Jan 9, 2024
1 parent 12d03b8 commit d4858f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/component/panels/filtersPanel/FiltersTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ function FiltersTableInner({
const selectedFilterIndex = useRef<number>();

const handelFilterCheck = useCallback(
(id, enabled) => {
(id, event) => {
const { checked: enabled } = event.target;

Check warning on line 56 in src/component/panels/filtersPanel/FiltersTable.tsx

View check run for this annotation

Codecov / codecov/patch

src/component/panels/filtersPanel/FiltersTable.tsx#L55-L56

Added lines #L55 - L56 were not covered by tests
void (async () => {
const hideLoading = await alert.showLoading(
`${enabled ? 'Enable' : 'Disable'} filter in progress`,
Expand Down Expand Up @@ -162,7 +163,7 @@ function FiltersTableInner({
return (
<ColumnWrapper>
<Checkbox
onChange={(checked) => handelFilterCheck(id, checked)}
onChange={(event) => handelFilterCheck(id, event)}

Check warning on line 166 in src/component/panels/filtersPanel/FiltersTable.tsx

View check run for this annotation

Codecov / codecov/patch

src/component/panels/filtersPanel/FiltersTable.tsx#L166

Added line #L166 was not covered by tests
checked={flag}
/>
</ColumnWrapper>
Expand Down

0 comments on commit d4858f0

Please sign in to comment.