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').
])
]);
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').
])
]);
1 Reply
Hung Thai
Hung Thai2mo ago
You can use the method on each Toggle ->fixIndistinctState()
Want results from more Discord servers?
Add your server