I have a dropdown embedded inside a table. When the dropdown value changes, I show a confirmation popup. If the user clicks Yes, everything works fine. However, if the user clicks No, the changed value still remains selected in the dropdown, even though the table data is being refreshed via polling every 3 seconds. Only the dropdown value does not revert to the original value.
You may need to send a message, caught by your table/your dropdown view, to reset it.
Though a refresh of the binding should be enough to reset the value, so there may be something weird happening there.
Also: Why a dropdown for a boolean ? Why not a toggle switch or a checkbox ?
To expand on this, you need a generic popup takes a parameter, that parameter will probably be the primary key of the row that you clicked on the dropdown. When you handle the yes or no buttons, pass this primary key via message handlers to the dropdowns, which filter for the primary key, and it sets the dropdown selected to null or previous value when triggered by a "No".
Also to note, you can slow down the polling and use the message handlers to trigger a "refreshBinding" on the table binding after a click action.
I find this makes the table respond super rapidly to the user, and minimises polling on the database.
First, thank you all for your cooperation.
I was able to resolve this by creating a message handler in the dropdown’s view and simply resetting the dropdown value.