textinputcolumn lifecycle hook stop the action

TextInputColumn::make('sale_price')
                    ->rules(['min:0', 'numeric'])
                    ->type('number')
                    ->beforeStateUpdated(function ($action, $record, $state) {
                        if ($state >= $record->price) {

                            $action->halt();
                        }
                    }),


I have a table colum like above in my project. Inside beforeStateUpdated, can I halt the process so it won't save the value to the database? The code doesn't work by the way as $action parameter is not resolved. Thanks
Was this page helpful?