Closed Garima123639 closed 4 days ago
Hello @Garima123639,
Thank you for reporting the issue.
We would like to clarify the behavior of the events:
select
: This is an event triggered when the user selects text within the input field. It is not intended for handling dropdown item selection. - https://sap.github.io/ui5-webcomponents/components/Input/#selectselection-change
: This is triggered whenever the user navigates through suggestions (e.g., using arrow keys). It is designed for previewing items and is not equivalent to final selection. - https://sap.github.io/ui5-webcomponents/components/Input/#selection-changeFor detecting the final selection of a dropdown item (via Enter or click), please use input
event. This will provide the desired behavior, as the event is fired when the value of the component changes at each keystroke, and when a suggestion item has been selected.
Hope this helps!
Best regards, Ivaylo
In the previous version there was a handler onSuggestionItemSelect, which was fired when the item from the suggestion item is selected. In our case when we type something in the input field then we fire an api call which will fetch the matching suggestion results to be shown. Now from those suggestions if I select something then we need a separate handler for that and we can't use same onInput handler as that is gonna handle separate functionality. So here we need a handler which could specifically be fired when the suggestion item is selected. As this is gonna be functionality loss otherwise, request you to please look into this and solve the issue
Bug Description
onSelect event handler doesn't work as expected. It should ideally be fired when the user selects the element from the suggested items in the dropdown through either the keyboard enter or click but its not fired. Also onSelectionChange is fired everytime you press any keydown in the suggested dropdown so that could not be used. onSelect should be able to do the same task as onSuggestionItemSelect from the previous version but its not doing
Affected Component
Input
Expected Behaviour
onSelect should be able to do the same task as onSuggestionItemSelect from the previous version but its not doing
Isolated Example
No response
Steps to Reproduce
Log Output, Stack Trace or Screenshots
No response
Priority
None
UI5 Web Components Version
Version 2
Browser
Chrome, Edge, Firefox, Safari
Operating System
No response
Additional Context
No response
Organization
No response
Declaration