Update row in DynamicTable with Forge Custom UI

I created a DynamicTable with data from Jira REST API call. Now I need to update one of the rows. What is the best way to do this?

Refresh the hole table by again calling the REST API is not be the best option, because that would require some time.

The content of the table is in a variable as an array controlled via useState. I tried to cloned the array, manipulated it and set this as new content of the useState variable, but the DynamicTable is not automatically updating.

I am using the right concept? What am I doing wrong?

Hey @Holger,

did you set unique key properties for rows and cells? This is used by React to update the right elements, when a change to state is made.

Then, I think, it should work that you use the “setter” of the useState to replace the state and react rerenders accordingly.

Maybe you can share some example code?

1 Like