-
Notifications
You must be signed in to change notification settings - Fork 16
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
List items are misbehaving #3348
Comments
Another thing I'm noticing that we might turn into a separate issue: Pull to Refresh when filters are applied -- the button does not change colors nor are the filters listed on the popup, nor are they applied to the list after PTR-ing. It takes tapping the button again for the filters to be applied. Is that FAD / desired behavior? |
@drewvolz Can I see a gif of the bug? What do you mean by the menu list? |
The menu list is the list of menu items (sorry!) |
@drewvolz your issue in the first comment (not the OP, afaik) is cause by the removal of deriveStateFromProps. Without that, we never update the internal state of the filter popup's container. Another approach, and the way I was kinda thinking about exploring, would be to add a "key" to the FilterToolbarButton based around the values in the filter, such that changing a filter from outside would unmount and remount the component. If you look in React's docs for controlled/uncontrolled inputs, this is one of their suggestions. |
+1 |
The problem is that a good key is a hash of the object identity in this case, which is not something JS exposes. And that's where I left off. I started going down the rabbit hole of a UUID that changes when the object is changed, and abandoned it there in my local branch, but I think there's potential in that direction still. Maybe. |
#3350 addresses the issue mentioned in the first comment, but not the OP |
@drewvolz could we get a screen recording of the OP? |
@drewvolz Can we rename this issue to reflect the OP? I don't think it has anything to do with filters.. |
FWIW I'm seeing this same issue on Course Search. |
Please rename it to what seems right. I've renamed it to "List items are misbehaving" |
@drewvolz LGTM. I am going to create a separate issue for clearing of filters with PTR. |
Can we |
@hawkrives without specifying all merge commits that you want to test, I don't think so. |
I'm not entirely sure this isn't a bug with SectionList's rendering itself...look how in debug mode the weird behavior happens when the render window is resizing itself.. |
It may be, but it seems really odd that this suddenly showed up in the past few days. |
I've played a little with the Passing facebook/react-native#20956 AAO-React-Native/modules/food-menu/fancy-menu.js Lines 199 to 212 in 69e1f38
|
Would anyone be opposed to adding |
Yes |
If we can find a fix that doesn't involve disabling sticky section headers I would prefer that as well.. |
If we are to meet our release goal of January 1, I don't think there's any other way to fix this, since what we're seeing seems to be an internal issue with RN. (See upstream issues that Drew linked.) N.b. a fix PR is up at facebook/react-native#22025 but given that PR has seen no review or anything from the upstreamers for the last 30 days, (classic) I'm willing to bet that it's probably not going to get reviewed until after our deadline. I think it's best to apply that prop with a note to self to fix it, as seems to be the approach in #3353. |
What’re the risks of testing that patch ourselves and applying it to our repo? Do we feel like going with disabling sticky headers, testing the upstream patch, or something else? |
I have two PRs out now:
I'm in favor of #3357 instead of #3353. After running it myself, it appears to fix what we were seeing. |
Closed by #3357 |
I think something is mutating? When I scroll the menu list, it sort of... jitters. After that strange UI animation, it inserts a whole bunch of duplicate items in the list each time it loads. It continues to do so when I continue to scroll. Could you help debug this, please, @hannesmcman?
The text was updated successfully, but these errors were encountered: