Skip to content

Commit

Permalink
fix(table): handle null values in isFilterValueExist (#4829)
Browse files Browse the repository at this point in the history
  • Loading branch information
HHaoWang authored Dec 12, 2024
1 parent 6a8608a commit c092cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/table/hooks/useFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { renderTitle } from './useTableHeader';
function isFilterValueExist(value: any) {
const isArrayTrue = value instanceof Array && value.length;
const isObject = typeof value === 'object' && !(value instanceof Array);
const isObjectTrue = isObject && Object.keys(value).length;
const isObjectTrue = value !== null && isObject && Object.keys(value).length;
return isArrayTrue || isObjectTrue || !['null', '', 'undefined'].includes(String(value));
}

Expand Down

0 comments on commit c092cd5

Please sign in to comment.