33
44**type**: ``boolean`` **default**: ``false``
55
6- The ``choice_lazy`` option is especially useful when dealing with a large set of
7- choices, where loading all of them at once could lead to performance issues or
8- significant delays::
6+ .. versionadded:: 7.2
7+
8+ The ``choice_lazy`` option was introduced in Symfony 7.2.
9+
10+ The ``choice_lazy`` option is particularly useful when dealing with a large set
11+ of choices, where loading them all at once could cause performance issues or
12+ delays::
913
1014 use App\Entity\User;
1115 use Symfony\Bridge\Doctrine\Form\Type\EntityType;
@@ -15,17 +19,13 @@ significant delays::
1519 'choice_lazy' => true,
1620 ]);
1721
18- When set to ``true``, and used in combination with the ``choice_loader`` option,
19- the form will only load and render the choices that are preset as default values
20- or submitted. This allows you to defer loading the full list of choices and can
21- improve the performance of your form.
22+ When set to ``true`` and used alongside the ``choice_loader`` option, the form
23+ will only load and render the choices that are preset as default values or
24+ submitted. This defers the loading of the full list of choices, helping to
25+ improve your form's performance .
2226
2327.. caution::
2428
25- Please note that when using ``choice_lazy``, you are responsible for providing
26- the user interface to select choices, typically through a JavaScript plugin that
27- can handle the dynamic loading of choices.
28-
29- .. versionadded:: 7.2
30-
31- The ``choice_lazy`` option was introduced in Symfony 7.2.
29+ Keep in mind that when using ``choice_lazy``, you are responsible for
30+ providing the user interface for selecting choices, typically through a
31+ JavaScript plugin capable of dynamically loading choices.
0 commit comments