Closed KanedaFr closed 4 years ago
Im not sure i understand. COMPONENT_EVENT
is different to the CHANGE
event in ListView.
The COMPONENT_EVENT
is dispatched when a sub component (like a button, or a slider, or a checkbox) is used in a custom item renderer.
The CHANGE
event is dispatched when the actual selectedIndex of the actual listview changes.
Am i misunderstanding the issue?
Ian
I wrongly understood this post on the forum https://community.haxeui.org/t/cant-see-the-listview-text/130/3
I moved to UIEvent.CHANGE and every worked as expected. Sorry for this.
NAB
Expected Behavior
on ItemEvent.COMPONENT_EVENT, reading the selectedIndex / selectedItem should return the current selected item
Current Behavior
return the previous selected item (include -1/null at first) while event.data is right
Possible Solution
don't care about selectedIndex, only use event.data
Steps to Reproduce (for bugs)
use component explorer https://github.com/haxeui/component-explorer/blob/master/src/views/ListViewsView.hx add
Media
n/a
Context
Show more details about selectedItem, on click
Your Environment
OSX, hxwidgets backend