Hello guys,
I've got a reloading issue with my UI-Table that is directly filled from an array.
- In an injection node I have an SELECT query that MySQL-DB responds with a proper result set.
- The data array is forwarded to a function node which adds options and column definitions to the payload
- The "etable" node (from node-red-contrib-ui-etable) presents a nice looking table - but ONLY after I have clicked the "deploy" in the node-red flow!
- On a browser reload of the UI the table is no more filled and not even showing up. In that case the debug channel does not show any payload coming from the DB query.
Here's the code in my function node:
msg = {
payload: msg.payload,
config: {
options: {
"movableColumns": true,
"resizableColumns": true,
"selectable": 1,
"responsiveLayout": "collapse",
"autoResize": true,
"layout": "fitColumns",
"pagination": "local",
"height": "800px",
"groupBy": "system",
"groupStartOpen": true
},
columns: [
{ title:"Id", field:"SIGNAL_ID", align:"center", editor:"select", width:60 },
{ title:"Symbol", field:"SYMBOL", align:"center", width:120 },
{ title:"Signal", field:"SIGNAL_TYPE", align:"center", width:100 },
{ title:"Direction", field:"POS_TYPE", align:"center", width:60 },
{ title:"Entry", field:"ENTRY_PRICE", align:"center", width:100 },
{ title:"Date", field:"TIME", align:"center", width:180 },
{ title:"SL", field:"SL", align:"center", width:100 },
{ title:"TP", field:"TP", align:"center", width:100 },
{ title:"Vol.", field:"INITIAL_VOL", align:"center", width:80 }
]
},
//ui_control: {'callback':'rowSelectionChanged','rowSelection':'Name' }
}
return msg;
Does anyone have an idea why the reload leads to a blank table?
As you can see, I have tried with a delay node (in German: Verzögerung), in order to kind of drop the data with a delay, hoping that would help..
Btw. should I rather go with the ui-table from node-red-node-ui-table?
Cheers,
Marcel