When I manually add options to the select via JS, they are displayed correctly in the dropdown, but when I click, I do not see the selected items in the select input.
The issue happens only if the select is in a modal.
The option in the dropdown menu is not selected, but when printing the selected values, it appears.