Repeater Toggle others

How to toggle others false, if current is true

return $form
            ->schema([
                Forms\Components\TextInput::make('question')
                    ->required()
                    ->maxLength(255),
                Repeater::make('options')
                    ->columnSpanFull()
                    ->relationship('options')
                    ->schema([
                        TextInput::make('answer')
                            ->required(),
                        Toggle::make('is_true').
                    ])
            ]);
Was this page helpful?