fix(listview) segmentedbar crash#2128
Merged
NathanWalker merged 4 commits intoNativeScript:masterfrom Jun 3, 2020
Merged
Conversation
The issue occurs when a list is modified and the segmented bar is reloaded upon scrolling with existing SegmentedBarItems.
If the value is assigned, dereference the current parent assignment.
Contributor
Author
|
Not sure who to tag for getting a reviewer for this PR, @vakrilov perhaps? |
Contributor
Author
|
Sorry to bump, has been a few months now and resolves an open issue. Is it possible to have someone review this please? @NickIliev |
Contributor
|
Hi @Codex- thank for this PR - I was able to merge latest master in here (which includes angular 9 support) and would like to get this published by Thursday, thanks for the effort here 👍 |
Contributor
Author
|
Awesome, thanks for that @NathanWalker Would it be possible to add it as a hotfix release to the existing stable version too? I understand if not! |
Contributor
|
Definitely - this will go out with 9.0.1 or 9.0.2 this week 🤗 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-ngapplication.Manually tested on both iOS and Android.
What is the current behavior?
In a class with a member that contains an array of
SegmentedBarItems, using this to populate aSegmentedBarin alistView.When the
listViewhas scrolled below the view of theSegmentedBarand the items driving thelistViewchange, scrolling back to theSegmentedBarcauses a hard crash on Android.What is the new behavior?
Introduce a simple check as to whether a new value on
setPropertyInternalis an array, if so, check and unreference any of the items references to aparent&parentNode.The demo page contains a simple list containing a


SegmentedBaras 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