I’m trying to make a function component from this nice alpine-multi-select: Multi select alpine js by exatasmente | Alpinejs, Buttons, Forms, Selects
The component uses a hidden select
which I replaced with a Phoenix.HTML.multiple_select
<div x-data="dropdown($el)" x-init="loadOptions()">
<%= multiple_select @form, @field, @opts, selected: @sel, data_id: "sel", hidden: true %>
x-init
loads the options from the hidden select.
This works fine, but when liveview changes the options, the alpine-component is not re-initialized, so they are not refected in the custom-rendered select. Any ideas how I can force that?