ToggleButtons: Click to untoggle

Hi, I have a ToggleButtons-Component set up with an Enum-class. Is there a way to "untoggle" an already selected togglebutton. The desired result is that the delivery_method is set to null in the db.

ToggleButtons::make('delivery_method')
                            ->hiddenLabel()
                            ->options(DeliveryMethod::class)
                            ->reactive()
                            ->inline()
                            ->afterStateUpdated(function (string $state, Retouche $record): void {
                                $record->update([
                                    'delivery_method' => $state,
                                ]);

                                // Optionally notify the user
                                Notification::make()
                                    ->title('Delivery method updated')
                                    ->success()
                                    ->send();
                            }),
Was this page helpful?