[DataTable]: the table content doesn't re-render the changes when I update rows propos
See original GitHub issueWhat package(s) are you using?
-
carbon-components
-
carbon-components-react
Detailed description
The table cells doesn’t reflect the changes, when I updated an item in rows(DataTable propos). I can see the changes just when I add an extra item, or remove one.
React codeSandbox : https://codesandbox.io/s/carbon-datatable-render-issue-zt2gc?file=/index.js
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Table do not rerender after data change. When I update data ...
I have data coming in as a prop like below. I usually click a button in the parent component to change the prop...
Read more >ReactJS - Data Table did not re-render/update when state ...
I'm a reactJS fresher, and I've got a issue as I wrote on title. I saw that adding more product into ProductList by...
Read more >Rerender the datatable row after update
With server-side processing, the data shown in the table is basically readonly. Any change to the data needs a re-read from the server....
Read more >React re-renders guide: everything, all at once - Developer way
Comprehensive guide on React re-renders. The guide explains what are re-renders, what is necessary and unnecessary re-render, ...
Read more >MDBDataTable data does not render on state change
which means the row is deleted, even the message "Showing 1 to 1 of 1 entries" is updated from 2 to 1. but...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you’re right that it isn’t resolved specifically in the DataTable component due to its built in state manager, and I think the custom table route should be the way to go in the long run. I believe we should view the DataTable like ModalWrapper in that it is more of an example than a consumable component. Because there are many different use cases for managing table state, supporting every possible use case in DataTable would be extremely complex. so ultimately I think the solution is to allow consumers to use implement their own custom state manager with the Carbon table primitives as shown in the sandbox above. that being said I’m interested in hearing more opinions about this
That’s what I’ve done, and it works, it’s just because in our project we often use
DataTable
, it’s less lines of code 😃 Thanks!