Enterprise: Dropdown: Changed behaviors on dropdowns

Created on 29 Apr 2021  路  7Comments  路  Source: infor-design/enterprise

Describe the bug
When upgraded to ids-enterprise-ng 9, there are some behavior that changed on dropdowns:

  • onChanged is triggered even when same option is selected
  • When dropdown is open, prior behavior will select an option if there's a match on user's input and the dropdown will close. The current behavior is the matched option will only be highlighted but the dropdown will not close

To Reproduce
Stackblitz created https://stackblitz.com/edit/ids-quick-start-940-evax4j

Steps to reproduce the behavior onChanged triggered even on same option:

  1. in the stackblitz, select Arizona
  2. type AR
  3. Observe on logs that onChange is still triggered
  4. Expected behavior: onChange will not be triggered

onchange trigerred dropdown

behavior when dropdown is open and an option is matched:

  1. in the stackblitz, open dropdown
  2. type anything that will match the option, for example: WY will match Wyoming
    Expected behavior; Wyoming will be selected and the dropdown will be closed

Current behavior:
current select behavior

Previous behavior: M3 UI Implementation:
In our UI implementation, I entered 99 which matched the 99 option and the dropdown is closed.
previous select behavior

Version
ids-enterprise-ng 9

Platform

  • Infor Application/Team Name: M3 H5 UI Team
  • Device: N/A
  • OS Version: Windows 10
  • Browser Name: Google Chrome
  • Browser Version: Version 88.0.4324.190 (Official Build) (64-bit)
[5] m3 type

All 7 comments

Hi @marclouisgenedeguzman

I agree with point 1. And thats probably fixable.
However with point 2. This was changed on purpose and requested. But i can't seem to find which issue it was. I think @EdwardCoyle would know? Given that this was requested. I think its actually the correct behavior now.

Hi @tmcconechy @EdwardCoyle were you able to locate the ticket for this behavior? Is there a way to have like a switch for the behavior 2? Thanks.

Actually i just noticed you have the noSearch option on. So i think that means when we fixed this issue https://github.com/infor-design/enterprise/issues/4483 we changed the behavior. Since thats your issue i guess we could revert that fix (or at least that part). But first would like to discuss it internally.

I actually think it feels like the wrong behavior for it to just close. For example what if you want to find the second one start with W.. You cant. And if you look at a normal select like https://www.w3schools.com/tags/tag_select.asp if you type the key while open it doesnt just close.

So this feels incorrect to change to me. The event not triggering a change sure no problem there. Thoughts @EdwardCoyle ?

1) I agree we should probably fix the event problem
2) I agree that the menu shouldn't close when keying a matching value.

Per discussion with @marclouisgenedeguzman, the behavior of the menu itself is currently correct. The only change M3 is asking for is that we remove the ability to filter on the menu via text input when noSearch: true is set.

Not totally clear on the setting, so will let you handle it when you can @EdwardCoyle

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisfried picture chrisfried  路  19Comments

tmcconechy picture tmcconechy  路  25Comments

jamie-norman picture jamie-norman  路  55Comments

sanx72 picture sanx72  路  16Comments

jamie-norman picture jamie-norman  路  18Comments