How to update a table cell from JS function?

Hello there,

I use the new table component with a REST API query that works very well

But when an REST API finished to load in the table, I want to trigger a js function, to load data for each row and update specific cell

Here is my function

function loadData(key, index) {
  console.log("Running query for key: ", key);

  query.trigger({
    additionalScope: {
      key: key,
      module: "http"
    },
    onSuccess: function (response) {
      let data = table.data;
      data[index].name = response
     table.setData(data)
    },
  });
}

loadData("sample", 0);

The request is executed very well, but the table isn't updated (nothing happend), so my question, is how can I update the table in onSuccess ?

I tried using changeSet, but same result, no update is performed (using this topic: Create a changeset column for a table)

The colum called "name" exists in the table, with empty value, and I just want to put the response as soon the data is available, line by line

I tried the exact same function with the Legacy table component, and it's works perfectly as expected

Thanks for your help!

Hi @FlorianRuen Thanks for reaching out. The new table doesn't have a setData method. I recommend using Javascript to combine all of the data that you want to show in your table under one query or transformer & then use the transformed data as your table's data source