-
Hi , Is there a way to dynamicaly load options of a select based on the selected option value of an other select ? |
Beta Was this translation helpful? Give feedback.
Answered by
lee-to
Nov 8, 2024
Replies: 1 comment 2 replies
-
ReactiveSelect::make('Select one')->options([
1 => 1,
2 => 2
])->reactive(function (Fields $fields, int $value, Select $field, array $values): Fields {
$fields->findByColumn('select_two')?->options($value === 1 ? [
4 => 4,
] : [2 => 2]);
return $fields;
}),
Select::make('Select two')->options([4 => 4])->reactive(), |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
benjy8001
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reactive