How can I reset the value when I use confirm function in dropdownlist using Kendo Vue ?

0 Answers 27 Views
DropDownList DropDownList wrapper
Dev
Top achievements
Rank 1
Iron
Iron
Dev asked on 30 Jun 2021, 06:12 PM | edited on 02 Jul 2021, 05:57 PM

Hi, this is my problem.

I use the confirm function in kendo dropdownlist to make sure the user want to change the value or not.

When the user choose "cancel", that means he doesn't want to change the old value.

However the value in the dropdownlist UI shows the changed NEW value.

 

Here is the example: https://stackblitz.com/edit/dropdownlist-confirm?file=src/main.vue

Although the console shows "CANCEL", but the UI still shows the changed new value.

How can I fix this ? Thank you in advance!!!

Petar
Telerik team
commented on 01 Jul 2021, 08:00 AM

Hi. 

I think you've linked a wrong example. The one in the above link doesn't contain any logic related to change confirmation inside the DropDownList. Check the sample again and send us a new link with the correct project. 

Dev
Top achievements
Rank 1
Iron
Iron
commented on 02 Jul 2021, 05:59 PM

Hi, I updated the link above. I'm sorry that I pasted the wrong link.
Petar
Telerik team
commented on 05 Jul 2021, 06:58 AM

Hi,

Check this StackBlitz example that demonstrates how the targeted functionality can be implemented. 

The sample project uses the open event of the DropDownList. Every time it is triggered the current value of the component is stored. Then, based on the user's selection in the confirm dialog, the value data prop is changed.

No answers yet. Maybe you can help?

Tags
DropDownList DropDownList wrapper
Asked by
Dev
Top achievements
Rank 1
Iron
Iron
Share this question
or