infor-design / enterprise-wc

Enterprise-grade web component library for the Infor Design System
Apache License 2.0
27 stars 26 forks source link

IdsDropdown: select event does not work #2605

Closed fabiojpoli closed 1 month ago

fabiojpoli commented 1 month ago

Describe the bug The select event on IdsDropdown is not being fired as documentation suggests: https://github.com/infor-design/enterprise-wc/tree/main/src/components/ids-dropdown#events

Event listeners for input (trigger field) blur, change, focus, select, keydown, keypress, keyup, click, dbclick, beforetriggerclicked, triggerclicked events can be added to input component property:

To Reproduce

Expected behavior Console returns "select"

Version Latest

Screenshots Screen Shot 2024-07-18 at 4 21 02 PM

inforandy commented 1 month ago

thank fabio, valid and one we will target for a fix in august

tmcconechy commented 1 month ago

@fabiojpoli try this..

https://main.wc.design.infor.com/ids-dropdown/example.html

document.getElementById('dropdown-1').addEventListener('selected', function() {
    console.log('selected');
});
tmcconechy commented 1 month ago

That should fix....Also i updated the doc page. To selected

fabiojpoli commented 1 month ago

Adding listener to dropdown directly not for input works for me, please update the documentation accordingly where says to register event on input reference: https://github.com/infor-design/enterprise-wc/tree/main/src/components/ids-dropdown#events

tmcconechy commented 1 month ago

ok done