Use Tabulator examples in Node-Red

Hi Francesco,

your task isn't easy, and asked before.

  • you use the standard method, collecting your data in context and send the whole updated table to the dashboard in an array
  • you use commands to like "addRow" to add new data. But then your data only exits in tabulator and will soon disappear as the dashboard is only passing the commands to tabulator. So you have to cache the data too.

But there is help :wink:

https://flows.nodered.org/flow/35d0480ce9151b2a722fa9d185a37825

You have to pass your data through this subflow. Everything under a specific property will be added to the table and stored. By sending msg.payload.command='getTable'; you will get all your data.

the ui-control is used to update/refresh your table on connects and tab changes

image

  • Tabulator: the tabulator formatting JSON
  • the msg property where your data comes in (NOT payload!) like msg.state.col1="This is row 1"
  • a index property to identify rows (to be able to overwrite / update rows)
  • maxRows and maxStore to limit rows in tabulator and in context store
  • The Dashboard Tab name (to trigger redraws only if this tab is active)
  • a json where and who to store your data.

I haven't imported your flow, sorry, no time.