Skip to content

Commit aefdac5

Browse files
authored
Little type Improvement for useReactDataTable (#63)
1 parent d22232f commit aefdac5

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- `sorting` and `columnFilters` can be possibly undefined for not `useReactDataTable` hook
13+
1014
## [5.0.0] - 2024-03-27
1115

1216
### Changed

src/lib/types/TableState.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ interface TableState<TData, TFilter extends FilterModel> extends Pick<CoreOption
1414
/**
1515
* The column filters state
1616
*/
17-
columnFilters: TFilter;
17+
columnFilters?: TFilter;
1818
/**
1919
* The sorting state
2020
*/
21-
sorting: SortingState<TData> | undefined;
21+
sorting?: SortingState<TData>;
2222
}
2323

2424
export { TableState, FilterModel };

0 commit comments

Comments
 (0)