Skip to content

Commit

Permalink
fix(AnalyticalTable - TypeScript): fix incorrect setFilter type (#6842
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Lukas742 authored Jan 21, 2025
1 parent bf5187d commit 4a21ffb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ export const CustomFilter: Story = {
}
return rows;
}, []);
const columns = useMemo(
const columns: AnalyticalTableColumnDefinition[] = useMemo(
() => [
{
Header: 'Custom Column Filter',
Expand Down
4 changes: 2 additions & 2 deletions packages/main/src/components/AnalyticalTable/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export interface ColumnType extends Omit<AnalyticalTableColumnDefinition, 'id'>
*
* __Note:__ If set to `undefined`, the filter is removed.
*/
setFilter?: (val: string | undefined) => void;
setFilter?: (val: string | string[] | undefined) => void;
sortDescFirst?: boolean;
sortedIndex?: number;
toggleHidden?: (hidden?: boolean) => void;
Expand Down Expand Up @@ -153,7 +153,7 @@ export interface TableInstance {
*
* __Note:__ If set to `undefined`, the filter is removed.
*/
setFilter?: (columnId: string, filterValue: string | undefined) => void;
setFilter?: (columnId: string, filterValue: string | string[] | undefined) => void;
setGlobalFilter?: (filterValue: string) => void;
setGroupBy?: (columnIds: string[]) => void;
setHiddenColumns?: (columnIds: string[]) => void;
Expand Down

0 comments on commit 4a21ffb

Please sign in to comment.