-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix issue with dataframe width getting ignored #10036
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
Conversation
| } | ||
| }), | ||
| [ | ||
| columns, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: This would have been caught by our tooling if it didn't have disabled eslint rules. Can we refactor this so that the callback definition adheres to the rules of hooks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good 👍 I split it up in a way that allows full dependency inspection (+ remove the related eslint disables). However, the only way I found that fully allows this without breaking the debounce functionality is by splitting it into two callbacks and a memo. I will likely move this refactor into a dedicated PR since it might need some more thoughts and iteration and will do it for syncSelectionState + syncEditingState.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sounds good. I think a good outcome of that refactor would be if we could have a shared useDebouncedCallback hook that handles this for us since I'm sure it'll be useful in many other places outside of this file too!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, agree that a useDebouncedCallback hook would be useful. I moved the related changes to this PR: #10044
…dth-ignored-issue
## Describe your changes Fixes an issue with the dataframe width being ignored if a different height was also provided (caused by wrong usage of setting state in effects based on the previous state). ## GitHub Issue Link (if applicable) - Closes streamlit#9762 ## Testing Plan - Add e2e test. --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
Describe your changes
Fixes an issue with the dataframe width being ignored if a different height was also provided (caused by wrong usage of setting state in effects based on the previous state).
GitHub Issue Link (if applicable)
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.