Can the table scroll UNDER a template?

@Christian-Me Could I get a little nudge to point me in the right direction please?
Have now got a message that includes the row number on each click.
But I am unclear how to send it back to the table node...
Here is the code and the debug message.

Here is how I have the flow setup to catch every click on the table.
image

Thanks.

EDIT. Never mind. Refresh the browser and its working.

For those following along, this will highlight the selected row in a table.
To recap....

Second Edit based on Christian-Me extra info a few posts down..
The ui control node does not output anything (as per dceejay post just above this one) so does not need to be hooked to anything.

  1. Install the correct table node. You want node-red-node-ui-table.
  2. Place a ui control node on the flow, select 'Change tab or group events only' from the drop down menu.
  3. Place a function node on your flow.
  4. The function node code is as follows. (Just cut and paste it all in).
msg.ui_control = {tabulator:{}};

msg.ui_control.tabulator.selectable=1;

return msg;
  1. Deploy and refresh your browser.

In the documents you find how to select rows (Tabulator)

So it is a "command" or procedure call done by sending a object to ui_table:

A Function node prepares the object and sets msg.row as the parameter for selectRow

msg.payload={
    "command": "selectRow",
    "arguments": [
        msg.row
    ],
    "returnPromise": false
}
return msg;

image

You find more info in the help panel or in the readme.md of ui_table
image

Some thoughts!

  • Your select row function node does NOT select a row! It only aktivate the selection feature of ui-table!
  • to select a row you have to send the selectRow(yourID) to ui_table
  • your ui-control node does nothing to your flow (not wired to anything). Suggestion:image
  • Just to make this clear. The command is only needed if you wish to select a row by Node-RED to highlight a value change for example. There is no need to "send it back". :wink:

and trigger all ui-controll events should avoid browser refresh. perhaps check with your debug node if the ui_controll message is sent after deploy

image

Thanks for the extra info. I have edited my post above to reflect your input.

The ui control does not output anything (for the table row selection) so does not need to be connected to anything - since its not sending a message.

I think the main difference is that I only wanted to highlight the row, not do anything with the data (its already sent to the template node on selection).

The idea of the ui-control node is to inject the ui_control message (to activate selection) once a browser connects or a tab is changed: (This is what happens on reload: First lost, then reconnect and then the tab is activated = change)

image

So change should work but you are right on deploy of modified nodes this does not happen (allways). in your flow the first click on a row sends the "default" message and then your select row function is triggered activating the select mode. I assume that a selection only works on the second click after deploy. I use a inject node and the ui_control node combined to send all configurations.