EA Dropdowns are not populated until you click in them
Describe the bug I am observing that for example Country Fields do not get populated without further user interaction, which makes it hard to add events on specific clicks.
This is how the HTML looks like for a CountryField upon loading:
But, once you click it, the JS will transform the Select List into a proper HTML list. Then, it looks like this:
I weren't able to find the proper JS for it, but instead of this behavior, the code should either a) pre-populate the list automatically upon rendering b) fire an specific event in case of clicking, so that developers have it easier to hook into it (i.e. to set events to the individual targets)
If somebody can provide me with an Entry point for this I might be able to do it myself, too.
We use a third-party library called "Tom Select" to manage dropdowns. They provide many events, so maybe you can use any of them. See https://tom-select.js.org/docs/events/
Perfect, I will give it a look, thank you very much @javiereguiluz :heart:
@javiereguiluz Where can I find documentation on how Tom Select can be called in Symfony FormBuilder? I'm trying to essentially real time update the value of one field based on the contents of another.
So I figured out that only two (of the fews I've tested) events are fired, and opened this bug report: https://github.com/orchidjs/tom-select/issues/659
@Ctucker9233 I think you would ask that rather on StackOverflow.