diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index bde2eaa9e7..cb07346db6 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -22,6 +22,7 @@ The `start` task used in our turbo configuration is now marked as `persistent` a === Bug fixes +https://github.com/eclipse-sirius/sirius-web/issues/4360[#4360] [table] Prevent application crash when opening tables from a form === New Features diff --git a/packages/tables/frontend/sirius-components-tables/src/columns/useTableColumnFiltering.ts b/packages/tables/frontend/sirius-components-tables/src/columns/useTableColumnFiltering.ts index 9b89372016..740cef9566 100644 --- a/packages/tables/frontend/sirius-components-tables/src/columns/useTableColumnFiltering.ts +++ b/packages/tables/frontend/sirius-components-tables/src/columns/useTableColumnFiltering.ts @@ -81,7 +81,7 @@ export const useTableColumnFiltering = ( if (!enableColumnFilters) { return { - columnFilters: undefined, + columnFilters: [], setColumnFilters: undefined, }; } diff --git a/packages/tables/frontend/sirius-components-tables/src/columns/useTableColumnFiltering.types.ts b/packages/tables/frontend/sirius-components-tables/src/columns/useTableColumnFiltering.types.ts index baaf80bd7b..9642274df5 100644 --- a/packages/tables/frontend/sirius-components-tables/src/columns/useTableColumnFiltering.types.ts +++ b/packages/tables/frontend/sirius-components-tables/src/columns/useTableColumnFiltering.types.ts @@ -16,8 +16,9 @@ import { MRT_ColumnFiltersState } from 'material-react-table'; export type ColumnFilterSetter = ( columnFilters: MRT_ColumnFiltersState | ((prevState: MRT_ColumnFiltersState) => MRT_ColumnFiltersState) ) => void; + export interface UseTableColumnFilteringValue { - columnFilters: MRT_ColumnFiltersState | undefined; + columnFilters: MRT_ColumnFiltersState; setColumnFilters: ColumnFilterSetter | undefined; }