Select element doesn't work when used in dropdown element

Hey,
I’m trying to use a dropdown element that shows different “select” elements, but when I choose one of the “select” options, it closes the dialog and doesn’t actually choose the selected choice.