Ui-table supports ui_control

Do I need to use ui_control to instruct how many rows the table displays? My table is only showing 2 out of 8 rows. It automatically makes a scroll bar, but I would prefer to have all 8 rows visible. Thanks

oops, now I see I can just set the size to something other than 'auto' using the editor.

One thing I am going to do... at some point is to make tables do their own dynamic sizing in some scenarios. I just have not gotten down my list to that item yet! A long long list.

I've tried several thing, and it might coming from me being a newbie in Javascript, but i can't seem to be getting the whole table value out. It seems you can only get values out when interacting with the table (click, resize...). Can someone confirm?

You already have the entire table, what you send to the ui-table node in the first place? Or is this post editing the data in the table?

I think I can see one way to do it... but there should be other ways I would think, and that is to keep a 'copy' of the table in a flow or global variable, and update that as the table is updated or changed. Then you can use this copy as needed.

The following link gave me the idea that keeping a copy of the table in a flow or global variable would be maintained change by change to the table UI-Table: how to use commands to add / update table content dynamically. But this seems like a lot of work to do this.

Hi,

I wrote a subflow handling a ton of stuff arround ui-table

features

  • buffer table data
  • edit cells (as overlay)
  • add or update individual rows or cells of the table
  • delete rows
  • clear tableData
  • handle column width
  • handle column order
  • hide und unhide columns
  • hide and unhide rows
  • interface context menu
  • record and replay manual row order
  • set and maintain max amount of rows
  • export cached table

For more detailed information see node (subflow) info panel & examples published here (ie. remote-device-table, syslog-server, healthy-indoors-project)

Currently to busy to do a little bit of cleanup but works for me just fine.

The subflow is to big to paste in here. You can find the latest version on github contained in my lates project:

1 Like

Indeed, a solution is to build a table aside from ui-table, but that makes it more of a display table than a real interactive table. Tabulator seems to be quite powerful, so it's a pity if you need to build code aside from it to handle edited cells or switched rows, instead of getting the whole table value when you're done.

Thanks, i'll take a look at it, that's an interesting projects.

You are right that tabulator is quite powerful and there is certainly a way to “flush” the table back to node-red. But when? And what happen when the user closes the browser before? Or a another client connects?

It all depend of your use case.

I feel better when I have my data in Node-RED always up to date. It causes less traffic too if you only send changed data back and forth instead complete tables.