Run Action When Table Row Selected?

  • 1
  • Question
  • Updated 1 year ago
  • Answered
I'm trying to run an action on the selected row as the row is selected using the Skuid table checkbox. I know I can create a UI-Only checkbox and then run an action when that checkbox is selected for that row, but that doesn't allow me to use "Select All" Checkbox at the top of the table or run mass-actions on those selected rows. Is this possible?
Photo of Sam Becker

Sam Becker

  • 1,178 Points 1k badge 2x thumb

Posted 1 year ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
It would be but it would take quite the effort. Using the class "nx-skootable-rowselect" of the input  element you can watch for clicks. Then in js you could look for the closest div with the class "nx-skootable nx-editor". Once their you could use id on the div to get the component via the Skuid API.  ie. skuid.$C('div-id-here'). This along with knowing tr the click was on, you could then know which row the click was on, to which you could then do what it is you need to do.

You could do what you need using js, or install our Template w/ Action Framework component to store your Action Framework and call it by publishing the event name assigned to the template.
Photo of Sam Becker

Sam Becker

  • 1,178 Points 1k badge 2x thumb
I believe that is more in-depth than I would like to go, but thank you for the response and explanation. 

My workaround is just to hide the Skuid table checkbox column completely and have a field column checkbox that runs an action to update the fields in the row that I need to. This way they can at least Tab-Tab to get everything done without having to do too much extra work.

Thanks again!
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
It would be great to have an ability to run action framework or snippet when a row is selected. That along with the row object as a parameter.