Blur event on a component in a list view fires after it's source changes

This one may be a bit esoteric, but it has a major impact on my app.

I have a Listbox that selects what the data source for the ListView is.

I have a blur event on a Select component in the ListView. The Blur handler saves the contents of the Select component to the database in the background.

When I click a value in the Listbox, its Change event fires before the Select components Blur event. So the contents of the Select component changes to the new data and then the Blur event fires to update the database, with the wrong value!

See video:

I have mentioned this before, but we need beforeChange and afterChange events and the equivalent on every component. beforeShow, beforeClose, beforePaint. Some like the beforeChange event need to have a cancel option so the change event does not happen.

I was able to reproduce thanks to your crystal clear video and filed requests for both this specific behavior and the beforeChange and afterChange events for every component.

We're also thinking about how we order/allow ordering of event handlers in the future, so I assume that would be somewhat relevant here as well.

Out of curiosity, is there a reason you're using the Blur handler instead of a Change handler?

I changed it to the Change handler which is a better choice for Selects.

However, for the Text components there are issues with Change as it fires on every key stroke. I am using Debounce to help with that, but if the user types in exactly the speed of the debounce, keystrokes can be dropped. Also, if the user click the Listbox too fast, it's Change still fires first.

Oh man. Understood. Glad you have a kind-of-workaround for now and I'll let you know if we have any updates for you here!