Change tracking not working in vue2 component

Hey,

i´m currently writing a plugin for an js lib.

I´ve to use a vue2 components for that:

component: {
    name: "testPlugin",
    template: "<div phx-update='replace' id='testPlugin' > <%= @test %> <button class='btn btn-ghost' phx-click='test_event'> <i class='text-2xl mdi mdi-eye'> </i>  </button></div>",
},

Now my problem is that the event “test_event” is working and reaching my handler, but the value of “test” doesnt change according to the new assigns

@impl true
def handle_event("test", params, socket) do
  socket
  |> assign(:test, "test")
  |> noreply()
end

Many thx.

Turns out it doesnt work because of a previous mandatory phx-ignore statement.

1 Like