Hi All.
I have a standard LiveView and Form Component (in fact both were generated by phx.gen.live). In my FormComponent I have a SelectComponent. My SelectComponent receives a message via phx-click and processes it via handle_event. All works fine and dandy.
I now want my handle_event in the SelectComponent to send a message to the FormComponent similar to:
send(self(), {:updated_select, %{field: socket.assigns.field, id: id}})
but the above code sends the messge to the top level LiveView. I’m sure other folks have had a similar challenge but I’ve spent a couple of hours searching and can’t find the answer.
So, how would I send a message to my parent which is a component not the grandparent which is the top level view?
many thanks for any help.
cheers