@@ -407,10 +407,6 @@ If you're building a form (:ref:`more on forms later <forms>`),
407
407
instead of adding ``data-model `` to every field, you can instead
408
408
rely on the ``name `` attribute.
409
409
410
- .. versionadded :: 2.3
411
-
412
- The ``data-model `` attribute on the ``form `` is required since version 2.3.
413
-
414
410
To activate this, you must add a ``data-model `` attribute to
415
411
the ``<form> `` element:
416
412
@@ -549,10 +545,6 @@ changed, added or removed::
549
545
Checkboxes, Select Elements Radios & Arrays
550
546
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
551
547
552
- .. versionadded :: 2.8
553
-
554
- The ability to use checkboxes to set boolean values was added in LiveComponent 2.8.
555
-
556
548
Checkboxes can be used to set a boolean or an array of strings::
557
549
558
550
#[AsLiveComponent]
@@ -606,10 +598,6 @@ single value or an array of values::
606
598
LiveProp Date Formats
607
599
~~~~~~~~~~~~~~~~~~~~~
608
600
609
- .. versionadded :: 2.8
610
-
611
- The ``format `` option was introduced in Live Components 2.8.
612
-
613
601
If you have a writable ``LiveProp `` that is some sort of ``DateTime `` instance,
614
602
you can control the format of the model on the frontend with the ``format ``
615
603
option::
@@ -717,10 +705,6 @@ make this work:
717
705
Hydrating with the Serializer
718
706
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
719
707
720
- .. versionadded :: 2.8
721
-
722
- The ``useSerializerForHydration `` option was added in LiveComponent 2.8.
723
-
724
708
To hydrate/dehydrate through Symfony's serializer, use the ``useSerializerForHydration ``
725
709
option::
726
710
@@ -1009,10 +993,6 @@ changes until loading has taken longer than a certain amount of time:
1009
993
Targeting Loading for a Specific Action
1010
994
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1011
995
1012
- .. versionadded :: 2.5
1013
-
1014
- The ``action() `` modifier was introduced in Live Components 2.5.
1015
-
1016
996
To only toggle the loading behavior when a specific action is triggered,
1017
997
use the ``action() `` modifier with the name of the action - e.g. ``saveForm() ``:
1018
998
@@ -1026,10 +1006,6 @@ use the ``action()`` modifier with the name of the action - e.g. ``saveForm()``:
1026
1006
Targeting Loading When a Specific Model Changes
1027
1007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1028
1008
1029
- .. versionadded :: 2.5
1030
-
1031
- The ``model() `` modifier was introduced in Live Components 2.5.
1032
-
1033
1009
You can also toggle the loading behavior only if a specific model value
1034
1010
was just changed using the ``model() `` modifier:
1035
1011
@@ -1051,7 +1027,7 @@ Actions
1051
1027
1052
1028
Live components require a single "default action" that is used to
1053
1029
re-render it. By default, this is an empty ``__invoke() `` method and can
1054
- be added with the ``DefaultActionTrait ``.
1030
+ be added with the ``DefaultActionTrait ``.
1055
1031
1056
1032
Live components __are__ actually Symfony controllers so you can add
1057
1033
controller attributes (i.e. ``#[IsGranted] ``) to either the entire class
@@ -1897,10 +1873,6 @@ When the user clicks ``removeComment()``, a similar process happens.
1897
1873
Using LiveCollectionType
1898
1874
~~~~~~~~~~~~~~~~~~~~~~~~
1899
1875
1900
- .. versionadded :: 2.2
1901
-
1902
- The ``LiveCollectionType `` and the ``LiveCollectionTrait `` was added in LiveComponent 2.2.
1903
-
1904
1876
The ``LiveCollectionType `` uses the same method described above, but in
1905
1877
a generic way, so it needs even less code. This form type adds an 'Add'
1906
1878
and a 'Delete' button for each row by default, which work out of the box
@@ -2697,10 +2669,6 @@ validated. To validate it, you have to set up a `PostMount hook`_::
2697
2669
Communication Between Components: Emitting Events
2698
2670
-------------------------------------------------
2699
2671
2700
- .. versionadded :: 2.8
2701
-
2702
- The ability to emit events was added in Live Components 2.8.
2703
-
2704
2672
Events allow you to communicate between any two components that live
2705
2673
on your page.
2706
2674
@@ -2975,11 +2943,6 @@ Suppose the user updates the ``listName`` model and the parent component
2975
2943
re-renders. In this case, the child component will *not * re-render by design:
2976
2944
each component lives in its own universe.
2977
2945
2978
- .. versionadded :: 2.8
2979
-
2980
- The ``updateFromParent `` option was added in Live Components 2.8. Previously,
2981
- a child would re-render when *any * props passed into it changed.
2982
-
2983
2946
However, if the user adds a *new * todo item then we *do * want the ``TodoFooter ``
2984
2947
child component to re-render: using the new ``count `` value. To trigger this,
2985
2948
in the ``TodoFooter `` component, add the ``updateFromParent `` option::
@@ -3496,10 +3459,6 @@ When a component re-renders, the new HTML is "morphed" onto the existing
3496
3459
elements on the page. For example, if the re-render includes a new ``class ``
3497
3460
on an existing element, that class will be added to that element.
3498
3461
3499
- .. versionadded :: 2.8
3500
-
3501
- The smart re-render algorithm was introduced in LiveComponent 2.8.
3502
-
3503
3462
The rendering system is also smart enough to know when an element was changed
3504
3463
by something *outside * of the LiveComponents system: e.g. some JavaScript
3505
3464
that added a class to an element. In this case, the class will be preserved
@@ -3574,10 +3533,6 @@ In this case, any changes to the ``<select>`` element attributes will still be
3574
3533
Define another route for your Component
3575
3534
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3576
3535
3577
- .. versionadded :: 2.7
3578
-
3579
- The ``route `` option was added in LiveComponents 2.7.
3580
-
3581
3536
The default route for live components is ``/components/{_live_component}/{_live_action} ``.
3582
3537
Sometimes it may be useful to customize this URL - e.g. so that the component lives
3583
3538
under a specific firewall.
0 commit comments