So I’m not sure if this is the best way to do this or not. But I would like to use a select field to let the user choose a particular item that is displayed and opens on a Modal. There would be 4 items and 4 modals. I tried several things but am not experienced enough to get it figured out. Any suggestions would be helpful.
Is your select field inside a form where you can have a button that is clicked? If so, then you should be able to do a dynamic event, mouse, on click to open the modal based on the selection chosen.
My initial thought was to do an open modal based on the selection changing, but with a select field, every time a user selects something, a modal would open. That would not make for a good user experience, so I think a button next to the select field would be better.
Given that you have a fixed number of modals - 4, another solution could be to just use ternary operator to show the modal based on value selected.
EG: