Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(listview) segmentedbar crash #2128

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

Merged

Conversation

@Codex-
Copy link
Contributor

@Codex- Codex- commented Mar 3, 2020

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 SegmentedBarItems, using this to populate a SegmentedBar in a listView.

When the listView has scrolled below the view of the SegmentedBar and the items driving the listView change, scrolling back to the SegmentedBar 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 a parent & 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.
image
image

Fixes #900

NathanWalker reacted with thumbs up emoji NathanWalker reacted with heart emoji
Codex- added 3 commits March 3, 2020 16:37
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.
Copy link
Contributor Author

Codex- commented Mar 8, 2020

Not sure who to tag for getting a reviewer for this PR, @vakrilov perhaps?

Copy link
Contributor Author

Codex- commented Apr 30, 2020

Sorry to bump, has been a few months now and resolves an open issue.

Is it possible to have someone review this please? @NickIliev

Copy link
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 👍

Codex- reacted with thumbs up emoji Codex- reacted with hooray emoji

Copy link
Contributor Author

Codex- commented Jun 3, 2020

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!

Copy link
Contributor

Definitely - this will go out with 9.0.1 or 9.0.2 this week 🤗

Codex- reacted with thumbs up emoji

@NathanWalker NathanWalker merged commit 1b191b0 into NativeScript:master Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

SegmentedBar *INSIDE* ListView - crashes on scrolling

AltStyle によって変換されたページ (->オリジナル) /