Skip to content

Commit a405475

Browse files
committed
[LiveComponent] Minor docs tweaks and changelog bump
1 parent 5dcd76a commit a405475

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

src/LiveComponent/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# CHANGELOG
22

3-
## 2.3.1
3+
## 2.4.0
44

55
- [BC BREAK] Previously, the `id` attribute was used with `morphdom` as the
66
"node id" when updating the DOM after a render. This has changed to
77
`data-live-id`. This is useful when maintaining the correct order of a list
88
of elements.
99

10+
- [BC BREAK] If using `LiveCollectionType`, the name of the remove field changed
11+
from `button_delete_prototype` to `button_delete` and the add field changed
12+
from `button_add_prototype` to `button_add`. Additionally, the `allow_add`
13+
and `allow_delete` default values were changed from `false` to `true`.
14+
1015
- [BEHAVIOR CHANGE] If an action Ajax call is still processing and a
1116
model update occurs, the component will _no_ longer re-render. The
1217
model will be updated internally, but not re-rendered (so, any

src/LiveComponent/src/Resources/doc/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ and ``live_collection_button_delete`` block prefix respectively:
12821282
{{ block('button_widget') }}
12831283
{% endblock live_collection_button_add_widget %}
12841284
1285-
If you only want to customize some attributes maybe simpler to use the options in the form type:
1285+
If you only want to customize some attributes, it maybe simpler to use the options in the form type:
12861286

12871287
// ...
12881288
->add('comments', LiveCollectionType::class, [
@@ -1301,12 +1301,12 @@ If you only want to customize some attributes maybe simpler to use the options i
13011301
// ...
13021302

13031303
If you want more control over how each row is rendered you can override the blocks
1304-
related to the ``LiveCollectionType``. This works the same way as for `the traditional
1305-
collection type`_, but you should use ``live_collection_*`` and ``live_collection_entry_*``
1306-
as prefixes instead.
1304+
related to the ``LiveCollectionType``. This works the same way as
1305+
`the traditional collection type`_, but you should use ``live_collection_*``
1306+
and ``live_collection_entry_*`` as prefixes instead.
13071307

13081308
For example, let's continue our previous example and customize the rendering of the blog post comments form.
1309-
By default the add comment button is placed after the comments, let's move it before them.
1309+
By default, the add comment button is placed after the comments. Let's move it before them.
13101310

13111311
.. code-block:: twig
13121312
@@ -1339,7 +1339,7 @@ Now add a div around each row:
13391339
collection view variables and a ``button_delete`` is added to each
13401340
item view variables.
13411341

1342-
As an another example, now let's create a general bootstrap 5 theme for the live
1342+
As another example, let's create a general bootstrap 5 theme for the live
13431343
collection type, rendering every item in a table row:
13441344

13451345
.. code-block:: twig

0 commit comments

Comments
 (0)