-
-
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
Fix case when scrollToPosition will not update internal state in React >= 16.4. #1288
Conversation
…t >= 16.4. In cases when the Grid component is controlled (WindowScroller, MultiGrid) fields scrollLeft and scrollTop ware not updated on setState call. getDerivedStateFromProps is called before every render starting from React 16.4 and those fields were overridden by previous props.
Nice! Did you maybe try to tackle #1170? Unfortunately, it still persists and I think the cause is somewhat similar. I took a bit of a radical approach which involves breaking changes (see #999 (comment) for more details). It would be nice if #1170 could be fixed within the confines of the current API, but I haven't found the way. |
Is there any update on this? I'm keen to get a solution to #1179 |
@uncleramsay I'm also waiting for this PR to merge. It seems the project is not maintained. |
@wuweiweiwu @bvaughn any thoughts here? |
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.
Can you run prettier and add tests?
@wuweiweiwu This one can only be reproduced in React >= 16.4. What I should do? Update: I've run prettier and it haven't introduced any changes. |
@wuweiweiwu just pinging you on this one! I really need this fix in for my application :) |
@wuweiweiwu ping! |
The only thing is that im worried that #1320 will have merge conflicts. I have some free time next week so ill see what i can do |
@wuweiweiwu any update? |
@wuweiweiwu @bvaughn any updates? |
I'll test and release later this week! Will update thread when that happens! Thanks for your patience |
Thanks for response dear @wuweiweiwu . We have broken functionality because of this issue. So I'm impatiently waiting for your release. |
@wuweiweiwu I think you have forgotten about this. |
Hey @wuweiweiwu |
@wuweiweiwu can we get this released please? |
@wuweiweiwu pretty please? :) |
@wuweiweiwu any update? Lots of people here waiting for the fix. Please let me know if I can help in any way... |
@uncleramsay Done!! Will release in a couple of days :) Thanks for your patience |
Can't believe thanks a lot ❤️ |
Released in 9.21.1!!!!! |
NOT Working with WindowScroller Hi @Jaycrypto
|
Fixes #1179 #1226
In cases when the Grid component is controlled (
WindowScroller
,MultiGrid
) fieldsscrollLeft
andscrollTop
were not updated onsetState
call.getDerivedStateFromProps
is called before every render starting from React 16.4 and those fields were overridden by previous props.
it also fixes Lists
scrollToRow
behavior with the same problem.Before submitting a pull request, please complete the following checklist:
npm test
) all passThis one can only be reproduced in React >= 16.4. What I should do?
npm run prettier
).npm run typecheck
).