Select::make('country')
->required()
->native(false)
->options(Country::class)
->dehydrated(false)
->afterStateUpdated(function (Set $set, ?string $state) {
$set('country', $state);
$set('billing_country_placeholder', $state ? "Selected country: $state" : 'No country selected');
}),
TextInput::make('billing_country')
->live()
->placeholder(fn (Get $get): string => $get('billing_country_placeholder') ?? 'No country selected')
Select::make('country')
->required()
->native(false)
->options(Country::class)
->dehydrated(false)
->afterStateUpdated(function (Set $set, ?string $state) {
$set('country', $state);
$set('billing_country_placeholder', $state ? "Selected country: $state" : 'No country selected');
}),
TextInput::make('billing_country')
->live()
->placeholder(fn (Get $get): string => $get('billing_country_placeholder') ?? 'No country selected')