Datable update in child component
Hello everyone.
In my project with LiveWire 2 I have a parent component "Show" that inside it has two child components "form" and "table". In form I have two inputs of type data and at submit I generate data by processing the result of the query. I pass this data in the form of an array I should pass it to the child component "table" to display it in a table managed by DataTable because I need to use filters and exports characteristic of DataTable. How to pass data from one component to another? I think I understood that the child components cannot communicate directly with each other but must pass through the parent component. So I should create a listener in the parent component to listen to an event emitted by the child component "form" and change the value of a property variable of "show" that I will pass in the mount of the "table" component. Right ?? The main problem is that the first time everything works, but every time I send the form the first time I lose the entire Datatable even though in js I have destroyed and recreated the instance of the table.
can you help me?
Ps. I apologize for my not perfect English...
Please or to participate in this conversation.