-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Feature request: Externalize ArrowKeyStepper state #687
Comments
<ArrowKeyStepper
columnCount={columnCount}
rowCount={rowCount}
>
{({ onSectionRendered, scrollToColumn, scrollToRow }) => {
// Do whatever you want with scrollToColumn and scrollToRow here
return (
<Grid
scrollToColumn={scrollToColumn}
scrollToRow={scrollToRow}
onSectionRendered={onSectionRendered}
{...otherGridProps}
/>
);
}}
</ArrowKeyStepper> |
If I call a Redux action there, that causes a setState function to be called within render, which results in a React warning. I'll create an example repo to show it |
Here is the issue (let me know if you know a better way to transfer the child args to Redux). Repo: https://github.com/mking-clari/stepper-warning |
You could dispatch your action on the next tick to avoid this. |
Anyway, I'm pretty swamped at the moment so I haven't been taking on feature requests for this lib. Happy to review a PR if you'd like to submit one though. 😄 |
I'll close this for now. If I have time I'll open a PR. Thanks for taking the time to review! |
Sounds reasonable. Thanks for understanding! |
I would like to manage the scrollToColumn/scrollToRow state in Redux. I see that I can set the ArrowKeyStepper's scrollToColumn/scrollToRow via its props. In addition, I would like an onChange function to capture scrollToColumn/scrollToRow changes.
I think ReactMeasure is a good example of a component that provides both options (function child vs onMeasure).
The text was updated successfully, but these errors were encountered: