Issue saving editable values in a table

  1. My goal: When a user edits/updates a cell in a table with a value, I want it to save.

  2. Issue: I currently have it saving but if i need to refresh the page, it deletes all the inputs

  3. Steps I've taken to troubleshoot: For the edit save handler, it is set to action: set variable, state: variable 9, method:set value, value: {{
    (() => {
    const base = [...table20.data];
    const updates = table20.changesetArray || ;

    updates.forEach(change => {
    // Match by Item (and Person if available in your dataset)
    const row = base.find(r => r.Item === change.Item && r.Person === change.Person);
    if (row) Object.assign(row, change);
    });

    return base;
    })()
    }} and then I have changed the table source to {{ variable9.value || transformer41.value }}

  4. Additional info: (Cloud or Self-hosted, Screenshots)

Hi @natasha, welcome to the Retool Community!

I came across a solution related to your issue in this community post. Please take a look and see if it resolves your problem:

Saving data in editable table columns

Let me know if it works for you.

3 Likes

Thank you so much! This has worked

2 Likes