Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing Data from one table to another #19

Open
5 tasks done
alimexTSH opened this issue Oct 23, 2019 · 1 comment
Open
5 tasks done

Passing Data from one table to another #19

alimexTSH opened this issue Oct 23, 2019 · 1 comment
Labels
wontfix This will not be worked on

Comments

@alimexTSH
Copy link

Which node are you reporting an issue on?

node-red-node-ui-table

What are the steps to reproduce?

Place two table nodes in a row.
Activate "Send data on click" on the first node
Choose the same columns on both nodes
Fill first node with data
Click on a line from the first node in the row

What happens?

The clicked on line ist transfered on to the second node but the data, which is inside the second node is also displayed in the first (clicked) node. You have to refresh the data in the first row (by button, etc.) to display data again. Also when clicking again, a line is transfered (added) to the second node but the content is again copied to the first node without linking them together.

What do you expect to happen?

The clicked on line should (maybe optional) disappear in the first node and will be visible in the second node. The rest of the items in the first node should stay.

Please tell us about your environment:

  • Node-RED version: 0.20.5
  • node.js version: v10.15.3
  • npm version: 6.4.1
  • Platform/OS: Frontend: Windows 10 x64 1803 Server:
  • Browser: Firefox Quantum 60.4.0esr (32-Bit)
@dceejay
Copy link
Member

dceejay commented Nov 1, 2019

the output is a single row. The input needs to be an array of rows... so you need to wrap the output into an array. eg

[{"id":"467e4909.34ced8","type":"inject","z":"1f7ee0df.a51cef","name":"","topic":"","payload":"[{\"Name\":\"<b>Yokoi</b>\",\"Age\":\"30\",\"Color\":\"lime\",\"Prog\":70,\"Star\":\"3\"},{\"Name\":\"<i>DCJ</i>\",\"Age\":\"50\",\"Color\":\"dodgerblue\",\"Prog\":\"45\",\"Star\":2,\"Pass\":false,\"web\":\"\"},{\"Name\":\"Nick\",\"Age\":\"40\",\"Color\":\"darkred\",\"Prog\":95,\"Star\":\"5\",\"Pass\":true,\"web\":\"http://nodered.org\"},{\"Name\":\"Oli\"}]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":260,"wires":[["d28aee5b.3ad75"]]},{"id":"d28aee5b.3ad75","type":"ui_table","z":"1f7ee0df.a51cef","group":"d1cd004f.aeb0e","name":"People","order":1,"width":"8","height":"3","columns":[{"field":"Name","title":"Who","width":"","align":"left","formatter":"html","formatterParams":{"target":"_blank"}},{"field":"Age","title":"Age","width":"40","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"Color","title":"","width":"5%","align":"left","formatter":"color","formatterParams":{"target":"_blank"}},{"field":"Star","title":"%","width":"100","align":"left","formatter":"star","formatterParams":{"target":"_blank"}},{"field":"Pass","title":"","width":"5%","align":"center","formatter":"tickCross","formatterParams":{"target":"_blank"}},{"field":"Prog","title":"","width":"80","align":"left","formatter":"progress","formatterParams":{"target":"_blank"}},{"field":"web","title":"URL","width":"","align":"left","formatter":"link","formatterParams":{"target":"_blank"}}],"outputs":1,"cts":true,"x":360,"y":260,"wires":[["53511801.3a2c18"]]},{"id":"1e148d5.3213e73","type":"ui_table","z":"1f7ee0df.a51cef","group":"d1cd004f.aeb0e","name":"People","order":1,"width":"8","height":"3","columns":[{"field":"Name","title":"Who","width":"","align":"left","formatter":"html","formatterParams":{"target":"_blank"}},{"field":"Age","title":"Age","width":"40","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"Color","title":"","width":"5%","align":"left","formatter":"color","formatterParams":{"target":"_blank"}},{"field":"Star","title":"%","width":"100","align":"left","formatter":"star","formatterParams":{"target":"_blank"}},{"field":"Pass","title":"","width":"5%","align":"center","formatter":"tickCross","formatterParams":{"target":"_blank"}},{"field":"Prog","title":"","width":"80","align":"left","formatter":"progress","formatterParams":{"target":"_blank"}},{"field":"web","title":"URL","width":"","align":"left","formatter":"link","formatterParams":{"target":"_blank"}}],"outputs":0,"x":780,"y":260,"wires":[]},{"id":"53511801.3a2c18","type":"function","z":"1f7ee0df.a51cef","name":"","func":"msg.payload = [msg.payload]\nreturn msg;","outputs":1,"noerr":0,"x":580,"y":260,"wires":[["1e148d5.3213e73"]]},{"id":"d1cd004f.aeb0e","type":"ui_group","z":"","name":"Richer Table","tab":"138e8ef4.b85141","order":1,"disp":true,"width":"8","collapse":false},{"id":"138e8ef4.b85141","type":"ui_tab","z":"","name":"Home","icon":"track_changes","order":1,"disabled":false,"hidden":false}]

If you want to delete from the first table you need to delete it from the backend array that sets up the data yourself.

@dceejay dceejay added the wontfix This will not be worked on label Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants