Skip to content
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

Fix server side checked items getter and fix useRequest when paginati… #1693

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

JSReds
Copy link
Contributor

@JSReds JSReds commented Jan 25, 2023

Fix server side checked items getter and fix useRequest when pagination is a dependency

Change-type: patch
Signed-off-by: Andrea Rosci andrear@balena.io

Connects-to: #
See:
Depends-on:
Change-type: major|minor|patch


Contributor checklist
  • I have regenerated jest snapshots for any affected components with npm run generate-snapshots
Reviewer Guidelines
  • When submitting a review, please pick:
    • 'Approve' if this change would be acceptable in the codebase (even if there are minor or cosmetic tweaks that could be improved).
    • 'Request Changes' if this change would not be acceptable in our codebase (e.g. bugs, changes that will make development harder in future, security/performance issues, etc).
    • 'Comment' if you don't feel you have enough information to decide either way (e.g. if you have major questions, or you don't understand the context of the change sufficiently to fully review yourself, but want to make a comment)

@JSReds JSReds requested a review from thgreasi January 25, 2023 16:58
@JSReds JSReds self-assigned this Jan 25, 2023
@@ -103,8 +104,14 @@ export const useRequest = <
return;
}
setData(undefined);
}, [...(options?.resetDataDependencies ?? deps), polling]);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @thgreasi sorry to bother you again, do you agree on adding this option to the useRequest hook ? this will allow us to exclude pagination properties from resetting data, and will avoid having the table resizing every pageChange (switching from empty to full)

…on is a dependency

Change-type: patch
Signed-off-by: Andrea Rosci <andrear@balena.io>
@JSReds
Copy link
Contributor Author

JSReds commented Feb 2, 2023

lgtm!

@JSReds JSReds merged commit 0bf1a61 into master Feb 2, 2023
@JSReds JSReds deleted the pagination-fixes branch February 2, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant