-
Notifications
You must be signed in to change notification settings - Fork 52
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
Table supports single object along with array of objects #1280
Table supports single object along with array of objects #1280
Conversation
Hey @gayanSandamal - I think you've misunderstood what the request was here... The idea is that if you send in a message with. a single object, it would append to the existing table's data. So, yes, in the case where you have no data, and send a single object in, this is fine. If I've already sent 100 rows of data via an array, then send a single object, that object should append to the existing 100 objects. I do now realise though, that we're still missing the "Action" option on tables, like we have with Charts, so could you add that in too please as part of this PR? It was mentioned on the attached issue here. Then, a user can choose "Append" or "Replace", with the former, single data objects would append to any existing data, the later, it would replace. |
@joepavitt thank you for clarification on this. I will update this PR |
@joepavitt I'm marking this as draft for now, as there’s still an issue with appending table data on the server side. It continues to replace instead of appending. However, it works fine on the frontend since I’ve added a separate new mutation for that. I'll investigate the backend behaviour further. |
Not sure I understand why the new store mutation is needed? You just need to maintain a local For the server-side, just store the messages as history like chart, no need to do anything else. Om load, cycle through the history and handle the data points accordingly. |
Thanks for the quick reply! You're absolutely right. I added the new mutation just to keep things clean, and yes, that can be handled in the UITable component. I'll make the changes as you suggested. |
@gayanSandamal Updated the PR and this is ready for reaview tested flow
Screen.Recording.2024-09-17.at.03.13.33.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed to make a few minor amendments before this could be considered ready:
- Move the "Action" option in the config editor as it was at the very bottom, and with lots of columns configured was easily lost.
- Added headers to the online docs to make it more obvious where the information was for sending data to the tables.
- There was no in-editor help for "Action", so I've added some
Description
Screen.Recording.2024-09-10.at.11.32.55.mov
Related Issue(s)
#255
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
area:migration
label