Select onchange and apply
There is a strange behavior with 'change' events on selects.
Essentially, when I click on the selects, the content changes successfully. However, if I then click on other buttons that also modify the content, including the 'selected="selected"' option, initially the selected options visibly change. But subsequently, upon clicking the buttons again, the selects do not change the selected option.
I've included three screenshots: the initial HTML situation, the result after clicking the button and the resulting HTML after the server applies changes.
The HTML has been modified correctly, but as you can see in the browser, the previous option remains. I've also tried with 'valueDiffing: true/false', but it doesn't make a difference.
I made an area where you can see the issue, go to http://temp6.fo7.doweb.site/admin
[email protected] useruser
then go to http://temp6.fo7.doweb.site/admin/private/pagesinternal/pages?UGFnaW5lSW50ZXJuZUlkPTQ1
open console
then for example select 2023 and select "Gennaio"
now click the double angle left and right -> you can see "2019" -> it should be "2023" like in the console
in the screen you can see.
initial state
response from server
applied result
what I see in the browser
thank you
Hey @DOWEBGit , I've logged in and it seems to be working correctly for me. When I select "2023" and "Gennaio", those values are shown in the browser and also in the HTML DOM element that shows up in the console they are marked as "selected". I don't see "2019" show up anywhere.
Maybe I just didn't fully understand what is missing. Feel free to make a minimal example on jsfiddle or similar. Maybe that will make it easier for me to understand what is going on.
Thank you,
You understood what I meant. I have recorded a video where you can see that at the end it shows '2019'."
Thank you!
Hey, I would need a minimal example with the entire code in order to fully understand what is going on there.
Try to login in the app, go to console and you can see the html of the two div that can try to merge.