Add HTML to cell in ui-table


I have a flow that queries a database and outputs the result (JSON) to a table using ui-table (v2).

I want to make it so that that every cell in the first column (which contains a customer number) becomes clickable, and when I click on the cell, the number is sent to the server (http request or simular) to use further in a new flow. Or better yet, make the whole row clickable (better user experience).

How would I go on to achieve this?

I presume you mean Dashboard 2 table widget, have you looked at docs Data Table ui-table | Node-RED Dashboard 2.0, this is a very basic widget.
It says for more customization look at this example UI Template Examples | Node-RED Dashboard 2.0

I will add that this is Dashboard 2 in topic title, if it is not please advise.

It's currently not possible in the base widget, but is a very quick feature to add - I'll try and get it in over the next few days.

GitHub Issue for tracking.

As @E1cid has mentioned the method now is to use ui-template node and manually build out a v-data-table

Update: I've created the PR for this: UI Table - Add row selection config, fix column arrangement & preserve defined labels by joepavitt · Pull Request #687 · FlowFuse/node-red-dashboard · GitHub

Needs to be reviewed, and I need to write some E2E tests, but almost certainly will be published in the next few days.

1 Like

That's awesome, thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.