Property null after submit

Hi I use the radio input and my select is hidden if all option is chosen but if I chose multi-select option $farmId is always null but if I remove the function hidden it is okay
Section::make('Select Farm')
                        ->schema([
                            Radio::make('type')
                                ->reactive()
                                ->options([
                                    'all' => 'All',
                                    'multi-select' => 'Multi Selection',
                                ]),
                            Select::make('farmId')
                                ->multiple()
                                ->reactive()
                                ->hidden(fn(\Closure $get) => $get('type') == 'all')
                                ->label('Ferme')
                                ->options(Ferme::all()->pluck('name', 'id'))
                                ->searchable(),
                        ]),
Was this page helpful?