Update table cell records after save?

I'm populating my table from an external API.
That works fine. Then when I click a custom bulk save action "import" button I'm setting a flag to true and passing the updated array back to the table like bellow.
            $this->getTable()->records(function()use($data){
                return $data; // updated array
            });

however, the table is not loaded and still uses the $table->records ... from the table function.

Do I have to make it so the table function loads from an alternate source all the time such that on init it loads from the function that gets called after save?

I thought I could set the records at anytime

$this->getTableRecords()->fresh() doesn't seem to be a function anymore.

I had it working in Filament 3

Basically I'm trying to update the is saved cell to be true.
Before just modifying the record value worked.
Now I can't get the table to refresh when I pass back updated records.
Was this page helpful?