fix(listview) segmentedbar crash #2128
Merged
+156
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
I ran the appium tests but it couldn't hurt to double check these too. In addition to this, I have also provided a test in the
test-app-ng
application.Manually tested on both iOS and Android.
What is the current behavior?
In a class with a member that contains an array of
SegmentedBarItem
s, using this to populate aSegmentedBar
in alistView
.When the
listView
has scrolled below the view of theSegmentedBar
and the items driving thelistView
change, scrolling back to theSegmentedBar
causes a hard crash on Android.What is the new behavior?
Introduce a simple check as to whether a new value on
setPropertyInternal
is an array, if so, check and unreference any of the items references to aparent
&parentNode
.The demo page contains a simple list containing a


SegmentedBar
as an item, scrolling to the bottom of the list reveals a button that triggers the effect being fixed here. Press this and the list will change, then attempt to scroll to the top of the list.Fixes #900