Is it possible to update state of a single row in the records table?

I have the following toggle button on a table, and update Eloquent model based on the $state. The problem I am facing is that all of Toggle buttons on the table re-render right now and create some unpleasant experience. How can I limit this to only a single row?

Tables\Columns\ToggleColumn::make('availability')
                    ->onColor('success')
                    ->getStateUsing(fn (Product $record) => $record->status == ProductStatus::ACTIVE)
                    ->updateStateUsing(function (Product $record, bool $state) {
                        $record->update([
                            'status' => $state
                                ? ProductStatus::ACTIVE
                                : ProductStatus::PAUSED
                        ]);
                    }),
Was this page helpful?