Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(types/pagination) #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nickzoum wants to merge 1 commit into table-library:master
base: master
Choose a base branch
Loading
from nickzoum:fix-types-pagination

Conversation

Copy link

@nickzoum nickzoum commented Aug 22, 2023
edited
Loading

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(...).

S0f0s reacted with thumbs up emoji
Add the declarations for the functions added to the "state and getters" object in the following lines
https://github.com/table-library/react-table-library/blob/3b0ddab82cf7c633731087ba9534020ec9099db2/src/pagination/usePagination.ts#L136C1-L141C5
 // src/pagination/usePagination.ts
 const stateAndGetters = {
 ...state,
 getTotalPages,
 getPages,
 getPageBoundaries,
 };
Copy link

When using the sort feature
I have this error.

image

Any one have the same problem
Thank you

Copy link
Author

nickzoum commented Oct 25, 2023
edited
Loading

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /