Skip to content

Commit 00a332d

Browse files
committed
fixes for table helper and examples
1 parent 6a318e3 commit 00a332d

File tree

21 files changed

+599
-223
lines changed

21 files changed

+599
-223
lines changed

examples/react/basic-table-helper/src/main.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@ const defaultData: Array<Person> = [
5353

5454
// 3. New in V9! Tell the table which features and row models we want to use. In this case, this will be a basic table with no additional features
5555
const tableHelper = createTableHelper({
56-
_features: {},
56+
_features: {columnSizingFeature: {}},
5757
_rowModels: {}, // client-side row models. `Core` row model is now included by default, but you can still override it here
5858
_processingFns: {}, // client-side processing functions used by the row models (sorting, filtering, etc.). Not needed in this basic example
59-
TData: {} as Person,
6059
debugTable: true,
60+
// TData: {} as Person, // optionally, set the TData type for the table helper. Omit if this will be a table helper for multiple tables of all different data types
6161
})
6262

6363
// 4. Create a helper object to help define our columns
64-
const { columnHelper } = tableHelper
64+
// const { columnHelper } = tableHelper // if TData was set in the table helper options - otherwise use the createColumnHelper method below
65+
const columnHelper = tableHelper.createColumnHelper<Person>()
6566

6667
// 5. Define the columns for your table with a stable reference (in this case, defined statically outside of a react component)
6768
const columns = columnHelper.columns([

0 commit comments

Comments
 (0)