haxeui-core icon indicating copy to clipboard operation
haxeui-core copied to clipboard

List item picker actions

Open Shallowmallow opened this issue 1 year ago • 4 comments

Added a dispatch SUBMIT event to the list views when there's a confirm action. Added an ActionStart event to ItemPicker. I don't like it to much, feels it goes against the logic of the dynamic trigger event, but don't see how else to do it. (( In fact I feel maybe MouseEvents should also be action events, but that would too much of an undertaking :P) No CANCEL action yet. I wonder if I should add directly to the listview. But don't feel it will be useful except in the case the listview is inside of an item picker

Shallowmallow avatar Feb 08 '24 13:02 Shallowmallow

is "sumbit" the right event? What do normal listviews do, or dropdown for example, i think its just "change", no?

ianharrigan avatar Feb 08 '24 14:02 ianharrigan

Yes it's Change. But Imagine just using the keyboard, when you press the down or up it , it does a change. So the list picker closes. (Also imagine multi items listviews, which doesn't really work for now, you should be able to select multiple items, so doing multiple changes, but only one submit) I think there's a certain logic as seeing the panel as some kind of form. Once it's submitted, it should close.

Le jeu. 8 févr. 2024 à 15:02, Ian Harrigan @.***> a écrit :

is "sumbit" the right event? What do normal listviews do, or dropdown for example, i think its just "change", no?

— Reply to this email directly, view it on GitHub https://github.com/haxeui/haxeui-core/pull/581#issuecomment-1934185015, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBNBIXROER2MEVNKUICFQ3YSTLF5AVCNFSM6AAAAABC7ZJEB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUGE4DKMBRGU . You are receiving this because you authored the thread.Message ID: @.***>

Shallowmallow avatar Feb 08 '24 14:02 Shallowmallow

i wonder if a generic "UIEvent.SELECTED" (or UIEvent.SELECT) makes more sense?

ianharrigan avatar Mar 13 '24 07:03 ianharrigan

Hmm, I think for normal list views SELECTED is good. But let's suppose the list view is a multiselection one. You press space to select one item, but you would press enter to validate the multi selection. It would be weird that only the "enter" dispatches a SELECTED event.

Shallowmallow avatar Mar 16 '24 09:03 Shallowmallow