react-table-library icon indicating copy to clipboard operation
react-table-library copied to clipboard

fix(types/pagination)

Open nickzoum opened this issue 2 years ago • 2 comments

Added the declarations for the functions to the "state and getters" object in the following lines

  // src/pagination/usePagination.ts
  const stateAndGetters = {
    ...state,
    getTotalPages,
    getPages,
    getPageBoundaries,
  };

So that you can get full type support when doing pagination.state.getPages(data.nodes).map(...).

nickzoum avatar Aug 22 '23 10:08 nickzoum

When using the sort feature I have this error.

image

Any one have the same problem Thank you

GOussama avatar Oct 25 '23 08:10 GOussama

@GOussama I'm not a project contributor, I just added a suggested change to fix a type issue I was having. Did your error happen after applying the suggested change? If not, then I don't think this is relevant to this PR and you should instead address the product owners.

nickzoum avatar Oct 25 '23 10:10 nickzoum