I have a table that updates with new rows from a stimulus controller table-update. When this update has taken place i would like to update some other elements on the page.
The first part was simple enough, generate the html serverside and replace all the children of the tbody. On the tbody i would have thought that i should have an action like change->update-select#update. This does not work.
I suspect that whatever needs to be done might be easy but im not even sure where to start looking for this.
Is this a global event as described in the handbook, if yes which event is it?
IIs it even possible to detect such a dom change and fire a stimulus controller? If yes, what im i missing, some sort of.event listener I presume, but i can’t find any trace of how to solve this.
I have considered using change callbacks such that table-update controller sets data-table-update-updated-value on the tbody and the have the actual callback handler in the update-select controller, im obviously also failing to get that to work as the data-value is bound one or the other controller as I understand it. Is this approach feasible at all?
My update-select controller wraps both the select and tbody so it should be in scope. I can post it if needed, but as it might be clear, it does nothing besides connecting to the DOM currently. Im sure that there is a dead easy Turbo solution, unfortunately that is not available in my toolbox, stimulus 2.0 is.
Thanks in advance