Append stream response to HTML select tag

Is it possible to append a stream response to a select? I’m not able to insert a turbo-frame between the select and their options and having the frame tag outside the select leads to this:

 <option>appended from stream</option>

I’m guessing I could build it myself by listening for Turbo events and doing it manually or appending the response to a hidden list somewhere and making the select sync with that list, but is there a native Turbo way to do this?


Remember, Turbo can only be inserted in places where it belongs, according to the DOM. A SELECT may only contain an OPTGROUP or and OPTION tag, no other child tags are permitted, even synthetic ones, unless they also quack like an OPTGROUP or OPTION. Stimulus can modify the options list of the select tag directly, but Turbo can’t replace it. What Turbo could do is simply replace the entire SELECT.


Thanks Walter! And that makes sense, it does seem to be easier to just replace the whole thing then.