[SOLVED] Computed column in Table
I'm replicating older code from Nuxt/Vue where I have a running sum column to sum values from each row with its preceding row's value. I am able to do this without TS Table, but would love to use TS Table to reduce code and overhead. I have a runningsum function that I apply to the initial state, so when the table is sorted, the runningsum do not change. Is there a right way to inject a calculated column in TS Table? Or a good way to inject the updated state with the new value?
I'm following the docs for the basic sorting: but cannot see how to apply my runningsum function to the resorted state to update the calculated values based on the new sort. This is the function based off the sorting example provided by TS using Person from faker and one changed field:
I'm following the docs for the basic sorting: but cannot see how to apply my runningsum function to the resorted state to update the calculated values based on the new sort. This is the function based off the sorting example provided by TS using Person from faker and one changed field:
1 Reply
other-emeraldOP•13mo ago
Solved - just went ahead and managed the state pre and post sort update.