-
Notifications
You must be signed in to change notification settings - Fork 18
[MOO-2029]: fix for virtual scrolling issue. #340
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
base: version/mx/10
Are you sure you want to change the base?
Conversation
LGTM 👍 |
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.
Hi, thanks for the fix!
I noticed that a new style called listContainer has been added with a default padding of 250px. Could you clarify why such a large default value was chosen?
Also, since this is a new style, it should be added to Atlas as well.
Additionally, please make sure to update the documentation in the mendix/docs repository and include an explanation of this new style there.
Hi @UrazAkgultan , true that the padding is actually a 'suspiciously big' value. In the sample app because of the bottom navigation bar overlaying on top of the list, I believe it is affecting the visible part of the list; therefore causing the scrolling issue. And thanks for the extra information about Atlas and updating the docs for these types of changes. |
As a conclusion, the fix will include only 'quick scrolling does not render/load items'. Fixed using the onEndReachedThreshold in combination with memoizing the renderItem function as a minor improvement. From testing with the gallery widget, we found another issue where it appears as if the Gallery widget's height remains fixed and overflows vertically (in this case). |
Checklist
[XX-000]: description
)? ✅Feature specific
Please remove unnecessary emojis and sections and this comment before proceeding
This PR contains
What is the purpose of this PR?
Fixing an issue with the virtual scroll in the Gallery widget.
Relevant changes
Addition of a prop in the FlatList component to control the onEndReachedThreshold value.
What should be covered while testing?
Case of fast scrolling through a list of over 50 items.