Setting value of Select field with Boolean value options does not work.

Using afterStateUpdated() to set the value of another field, which is a Select component that has Boolean options does not work.

Example:
Forms\Components\Select::make('code')
     ->label('Code')
     ->options(Currency::getCurrencyCodes())
     ->searchable()
     ->reactive()
     ->afterStateUpdated(static function (callable $set, $state) {
         $code = $state;
         $symbol_first = config("money.{$code}.symbol_first");

         $set('symbol_first', $symbol_first);
         })
         ->required(),
Forms\Components\Select::make('symbol_first')
     ->label('Symbol Position')
     ->options([
         true => 'Before Amount',
         false => 'After Amount',
     ])
     ->required(),


That does not work, but using a Radio component instead with the same method does work:
Forms\Components\Select::make('code')
     ->label('Code')
     ->options(Currency::getCurrencyCodes())
     ->searchable()
     ->reactive()
     ->afterStateUpdated(static function (callable $set, $state) {
         $code = $state;
         $symbol_first = config("money.{$code}.symbol_first");

         $set('symbol_first', $symbol_first);
         })
         ->required(),
Forms\Components\Radio::make('symbol_first')
     ->label('Symbol Position')
     ->options([
         true => 'Before Amount',
         false => 'After Amount',
     ])
     ->required(),


Am I doing something wrong here? How do I get this to work using the Select component?
Was this page helpful?