Skip to content

Commit

Permalink
fixes for table helper and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Nov 18, 2024
1 parent 6a318e3 commit 00a332d
Show file tree
Hide file tree
Showing 21 changed files with 599 additions and 223 deletions.
7 changes: 4 additions & 3 deletions examples/react/basic-table-helper/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ const defaultData: Array<Person> = [

// 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
const tableHelper = createTableHelper({
_features: {},
_features: {columnSizingFeature: {}},
_rowModels: {}, // client-side row models. `Core` row model is now included by default, but you can still override it here
_processingFns: {}, // client-side processing functions used by the row models (sorting, filtering, etc.). Not needed in this basic example
TData: {} as Person,
debugTable: true,
// 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
})

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

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

0 comments on commit 00a332d

Please sign in to comment.