Hi,
I evalute liveview and cosider moving our current react solution to liveview at some point.
For that I try to rewrite one of our pages. It is a list page, listing the main entity of our app. It also allows to select entities and invoke actions. Each action is shown as a dialog.
That woks well so far, but now I am running into a problem:
For one specific action, filtering for customers, I show a dialog. The dialog displays two select widget, selecting customers to include and to exclude. The select widget is rather complex and allows to select a set of customers.
The dialog and the contained select-widgets are both live components. In the select widget I want to notify the parent (dialog) about changes of the selection. But I see no valid way of doing that.
- By Sending a message, I will only reach the liveview.
- Using the example code in the phoenix docs, sending a function as parameter to the select widget is also difficult, because I do not want to send the results right away to live view, I rather want to update the state of the dialog
My prefered solution would be to trigger an event (like phx-change) in the select widget that would be received by the dialog. Is that possible?
I hope the question isnât too confusiong.