Multiple Select Change Event

General issues related to the use of Metro 4
Post Reply
LawrenceDesign
Posts: 4
Joined: Wed Dec 05, 2018 5:27 pm
Status: Offline

Multiple Select Change Event

Post by LawrenceDesign » Wed Dec 05, 2018 5:30 pm

In Metro4 when I use data-role="select" and use multiple attribute, the normal javascript on('change') event doesn't fire :(

When I try the data-on-change attribute the event fire when I add an item to selected items, but not when I remove a selected item :(

User avatar
olton
Site Admin
Posts: 133
Joined: Mon Apr 09, 2018 6:19 pm
Location: Kiev, Ukraine
Status: Offline

Post by olton » Wed Dec 05, 2018 6:39 pm

All works fine https://sandbox.org.ua/olton/code/kgDmB4b2al
Check your Metro 4 version. Must be 4.2.30

LawrenceDesign
Posts: 4
Joined: Wed Dec 05, 2018 5:27 pm
Status: Offline

Post by LawrenceDesign » Wed Dec 05, 2018 7:04 pm

Oh thank you. The new version is ok :)

LawrenceDesign
Posts: 4
Joined: Wed Dec 05, 2018 5:27 pm
Status: Offline

Post by LawrenceDesign » Wed Dec 05, 2018 9:13 pm

I have another problem with select and multiple select. When I change the value with jquery $('#xy').val('newval') the select doesn't follow this change visually.

LawrenceDesign
Posts: 4
Joined: Wed Dec 05, 2018 5:27 pm
Status: Offline

Post by LawrenceDesign » Wed Dec 05, 2018 9:23 pm

Sorry.. I got it... data('select').val( working.. Sorry

Post Reply