SplitButton: an event handler for when the user selects an item

in a Mapped Split Button, at the moment it seems it is only possible have one handler for the action "click" of the button.

There are no handlers for when the user changes the selected item in the split button.

It would be more than nice to have it

There is no official event, but I just tested this and it seems to work....

image

the query will trigger when that changes

2 Likes

good tip however "watched inputs" is only available for certain kinds of queries (resources/db/rest) and not for JS query.

So what I ended up doing is

  • creating a new mock REST query to http GET whatever.com
  • added the desired logic in a script executed on "on success" of the query
  • added {{loadConfigVersionBtn.selectedItem.id}} as a input to the query (added it as queryparameter)
  • added the {{loadConfigVersionBtn.selectedItem.id}} to "watched inputs"

Correct! I didn't write out that part, but that is what I did too. Have the one feed the other with the watched input as the trigger