Select::maxItems() is not reactive?

Hello, guys Why is method maxItems not reactive? The new item limit is not updated in the select, according to the value placed in the input.
TextInput::make('max_items_input')->live(onBlur: true),

Select::make('technologies')
->multiple()
->options([
'tailwind' => 'Tailwind CSS',
'alpine' => 'Alpine.js',
'laravel' => 'Laravel',
'livewire' => 'Laravel Livewire',
])
// It doesn't work
->maxItems(fn (Get $get): int => $get('max_items_input') ?? 1)
// It works
->helperText(fn (Get $get): string => $get('max_items_input') ?? 1)
TextInput::make('max_items_input')->live(onBlur: true),

Select::make('technologies')
->multiple()
->options([
'tailwind' => 'Tailwind CSS',
'alpine' => 'Alpine.js',
'laravel' => 'Laravel',
'livewire' => 'Laravel Livewire',
])
// It doesn't work
->maxItems(fn (Get $get): int => $get('max_items_input') ?? 1)
// It works
->helperText(fn (Get $get): string => $get('max_items_input') ?? 1)
2 Replies
Robinson
RobinsonOP14mo ago
Can anyone help?
Toni
Toni6mo ago
Do you solved this issue?
Want results from more Discord servers?
Add your server