Skip to content

proper way to add custom function and extend meta #5406

Closed Answered by vatoer
vatoer asked this question in General
Discussion options

You must be logged in to vote

my bad it should be "@tanstack/react-table"

- declare module "@tanstack/table-core" {
+ import { RowData } from "@tanstack/react-table";
+ declare module "@tanstack/react-table" {
  interface TableMeta<TData extends RowData> {
    updateData?: (rowIndex: number, columnId: string, value: string) => void;
    toggleAllBoolean?: (columnId: string, value: boolean) => void;
    changeAllOptions?: (columnId: string, value: string | number) => void;
    getIsAllTrue?: (columnId: string) => boolean;
    getIsSomeTrue?: (columnId: string) => boolean;
  }
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@stychu
Comment options

@tjunghans
Comment options

@zarocknc
Comment options

Answer selected by vatoer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants