Skip to content
Discussion options

You must be logged in to vote

Ok I think I found the answer.

In order to achieve that you will need to use stateReducer and dispatch.
1- Add a new type in the stateReducer.
2- Pass a payload in the dispatch with the same type.
3- Update your state

This is an example :

const stateReducer = (newState: TableState<any>, action: ActionType, previousState: TableState<any>, instance?: TableInstance<any>): TableState<any> => {
        switch (action.type) {
          case 'setRowState': // This is a new type
            return {
              ...newState,
              selectedRowIds: action.payload, // I will set my payload here
            };
          default:
            return newState;
        }
    };

The dispatch will…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ZiedHf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant