netpro25
netpro2512mo ago

On Select Change Event Listener

I have a select box that's in a table in the action column and I have it populated with some items that have a label and URLs as the values. I'm looking to fire off some script when the action changes and I have no idea on how to make this happen. Is this a background (frontend) runnable? I tried standard javascript event listeners but those are not working. I appreciate any direction!
6 Replies
netpro25
netpro2512mo ago
Maybe AgGrid is the only way?
rubenf
rubenf12mo ago
You can react to that specific component change
netpro25
netpro2512mo ago
AI Has suggested the following. customersTable is the component name. However this yields an error when running getAgGrid('customersTable').addEventListener('change', function () {}
rubenf
rubenf12mo ago
let say your selectbox is "a_a", connect your background or frontend runnable to react on change to a_a.result, and you can retrieve the row by looking at a.selectedRow maybe agGrid event listener work but the easiest in windmill is to connect to component's outputs instead and use windmill's app reactivity for backend script, if you take an eval as input it will be recomputed automatically upon changes for frontend script, you just have to declare the right output as dependency
rubenf
rubenf12mo ago
Connecting Components | Windmill
The strength of Windmill's app editor is the ability to connect everything together:
netpro25
netpro2512mo ago
I got it! Yeah learning curve on the Values watched area