You need to sign in to do that
Don't have an account?
Robert Baillie 10
How do I switch off the 'edited' highlighting in LWC lighting-datatable
I'm using a lightning-datatable in LWC, and hooking into 'oncellchange' to ensure that any inline editing is automatically included in the underlying javascript data model immediately.
I then have another button 'Recalculate' that is not in the data-table, and this button will 'action' the change and perform some calculations elsewhere on page.
On click of the 'Recalculate' button, I would like the yellow highlights on the inline edited cells of the data-table to be cleared, but I can't work out how. This is so the user can see that their changes have been applied.
Does anyone have any idea?
I then have another button 'Recalculate' that is not in the data-table, and this button will 'action' the change and perform some calculations elsewhere on page.
On click of the 'Recalculate' button, I would like the yellow highlights on the inline edited cells of the data-table to be cleared, but I can't work out how. This is so the user can see that their changes have been applied.
Does anyone have any idea?
Sorry for this issue you are facing.
I managed to get it done, by force re-rendering the data-table. Which I did by changing the table's column attribute. You have to track column and then recreate column by slicing and stitching column array together. Thanks,
Nagendra