File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 31
31
"symfony/property-access" : " ^5.4.5|^6.0|^7.0" ,
32
32
"symfony/property-info" : " ^5.4|^6.0|^7.0" ,
33
33
"symfony/stimulus-bundle" : " ^2.9" ,
34
+ "symfony/translation-contracts" : " ^2.5|^3.0" ,
34
35
"symfony/ux-twig-component" : " ^2.8" ,
35
36
"twig/twig" : " ^3.8.0"
36
37
},
Original file line number Diff line number Diff line change 16
16
use Symfony \Component \Form \FormInterface ;
17
17
use Symfony \Component \Form \FormView ;
18
18
use Symfony \Component \HttpKernel \Exception \UnprocessableEntityHttpException ;
19
+ use Symfony \Contracts \Translation \TranslatableInterface ;
19
20
use Symfony \UX \LiveComponent \Attribute \LiveProp ;
20
21
use Symfony \UX \LiveComponent \Attribute \PreReRender ;
21
22
use Symfony \UX \LiveComponent \Util \LiveFormUtility ;
@@ -286,7 +287,10 @@ private function extractFormValues(FormView $formView): array
286
287
)
287
288
&& !$ child ->vars ['expanded ' ] // is a <select> (not a radio/checkbox)
288
289
&& !$ child ->vars ['multiple ' ] // is not multiple
289
- && !\is_string ($ child ->vars ['placeholder ' ]) // has no placeholder (empty string is valid)
290
+ && (
291
+ !\is_string ($ child ->vars ['placeholder ' ])
292
+ && !$ child ->vars ['placeholder ' ] instanceof TranslatableInterface
293
+ ) // has no placeholder (empty string is valid, translatable interface is valid)
290
294
) {
291
295
$ choices = $ child ->vars ['preferred_choices ' ] ?: $ child ->vars ['choices ' ]; // preferred_choices has precedence, as they rendered before regular choices
292
296
do {
You can’t perform that action at this time.
0 commit comments