Skip to main content
Participant
June 22, 2018
Question

Dropdown: get previous selection

  • June 22, 2018
  • 1 reply
  • 264 views

I try to update another field when the user changes the value of a dropdown. For this i am listening on the blur event of said dropdown. This works fine when a different value is choosen, however when the user makes the same selection my code is still getting executed. I would like to querry the previous selection, so i can prevent this. But when the blur event is triggered the value ist already set and apparently no longer stored in the event propertys. Is there some other way i can verify the value of a dropdown has indeed changed?

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
June 22, 2018

You can use the Validate event. event.value will return the new value, while event.target.value will return the old one. However, if the user doesn't make any changes to the selected value the validate event won't be triggered at all.