Skip to content

Commit

Permalink
try out deprecated state instead of never
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Aug 24, 2024
1 parent 09bef75 commit 7b53352
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ export interface TableState_ColumnFiltering {
columnFilters: ColumnFiltersState
}

export interface TableState_ColumnFiltering_Unavailable {
/**
* @deprecated Import the `ColumnFiltering` feature to use the column filtering APIs.
*/
columnFilters: ColumnFiltersState
}

export type ColumnFiltersState = Array<ColumnFilter>

export interface ColumnFilter {
Expand Down
7 changes: 5 additions & 2 deletions packages/table-core/src/types/TableState.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import type { TableState_ColumnFiltering } from '../features/column-filtering/ColumnFiltering.types'
import type {
TableState_ColumnFiltering,
TableState_ColumnFiltering_Unavailable,
} from '../features/column-filtering/ColumnFiltering.types'
import type { TableState_ColumnGrouping } from '../features/column-grouping/ColumnGrouping.types'
import type { TableState_ColumnOrdering } from '../features/column-ordering/ColumnOrdering.types'
import type { TableState_ColumnPinning } from '../features/column-pinning/ColumnPinning.types'
Expand All @@ -17,7 +20,7 @@ import type { TableFeatures } from './TableFeatures'
export type TableState<TFeatures extends TableFeatures> = UnionToIntersection<
| ('ColumnFiltering' extends keyof TFeatures
? TableState_ColumnFiltering
: never)
: TableState_ColumnFiltering_Unavailable)
| ('ColumnGrouping' extends keyof TFeatures
? TableState_ColumnGrouping
: never)
Expand Down

0 comments on commit 7b53352

Please sign in to comment.