AFAIK, this is not possible, see this issue: phx-hook does not run in elements dynamically added to the DOM · Issue #2563 · phoenixframework/phoenix_live_view · GitHub.
I was doing something similar in the past but the idea of force-mounting hooks (to support dynamically added elements) was never implemented because of some security concerns. I’m hoping this will get revisited at some in the future though.






















