Event handler does not have access to component states

Hello @Nico_Del_Piano!

Unfortunately the new ListView component doesn't handle the sub-component values. You can see in a preview that it is usually only returning the first entry's values and when you run it has no context/scope as you have described.

With ListViews, however, you can place a button within the list component that can process the current item's values within the JS script of the event handler. You can log the button tracking component values to the console to test this out -- textInput1.value should return the value of that named component in the ListView for any row that is clicked. Usually I pass this data to the responsible query using the additionalScope option for the query trigger.

Here is a post which uses this setup and then goes on to some additional use cases: Updating the table editable values - #16 by pyrrho

Aside: this is also how I like to send currentRow data (for things like custom columns) when using table actions.

1 Like