Unplanned
Last Updated: 18 Jun 2024 12:57 by ADMIN
Matija
Created on: 17 Jun 2024 14:18
Category: AutoComplete
Type: Feature Request
0
AutoComplete onSelect Event

Hello there,

So, I am creating component that uses AutoComplete and I have one question. Do you think you can include some sort of onSelect event when we actually change the value of component from one of the list in the popup? For now, I introduced itemRender function that renders custom item in the popup list and that item have onClick event which is the function that I call when some item is clicked from the list, but for example I don't have support when I press Enter keyboard. In my opinion it would be logical to have some sort of onSelect event that would cover this problem - in that case I don't need to have additional logic for clicking item in the popup.

Greetings,

Matija

3 comments
ADMIN
Wissam
Posted on: 18 Jun 2024 12:57

You are welcome, Matija. We have such an event for the Autocomplete of Kendo UI for jQuery:

I am converting this ticket to a public feature request where other developers can vote for it:

Thank you for your feedback. I updated your Telerik Points accordingly as a small token of gratitude for your report.

Regards,
Wissam
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Matija
Posted on: 18 Jun 2024 12:46

Hello Wissam,

Thank you for response,

In the meantime I think this approach will solve my problem and thank you for that, but all in all I think it should be part of callback functions in the component like it is in your other versions such as Angular if I recall correctly.

Greetings,

Matija

ADMIN
Wissam
Posted on: 18 Jun 2024 12:13

Hi, Matija,

I can convert this to a feature request in the feedback portal. However, before that, I would like to ask you if you have tested the onChange event. Combining it with the value prop, you can control the components value:

Inside of the onChange event you can access information to check when enter key or the mouse click is used.

const handleChange = (e) => {
    //info from event
    console.log(e.syntheticEvent.type);
    console.log(e.syntheticEvent.key);
    //you can customize the set value
    setValue(e.value);
  };

Looking forward for your reply.

Regards,
Wissam
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!