Open
Description
If you place a SegmentedBar inside an *ngIf
the selectedIndexChange
event is fired before the property value for selectedIndex
is pulled from the component. This may cause the event handler to set the value of selectedIndex
to 0 (or array.indexOf(0) if you are getting/setting some other variable on it's index within an array of possible values)
- sample app https://play.nativescript.org/?template=play-ng&id=Lbf1Jq&v=5
selectedIndexChange
should wait until the value has been propagated from the template/component before firing for the first time.
Affects TabView component also, but slightly differently. The correct tab remains selected even though the model value has changed? (is it somehow skipping change detection?)