Skip to content

Commit

Permalink
bug #6372 Fix twig regex for collection field (related to #6364) (Gui…
Browse files Browse the repository at this point in the history
…llaumeRoques)

This PR was merged into the 4.x branch.

Discussion
----------

Fix twig regex for collection field (related to #6364)

The twig regex need to have double backslash, without this fix the data-num-items is always set to 1.
Fix #6369

Commits
-------

717f5e8 Fix twig regex for collection field (related to #6364)
  • Loading branch information
javiereguiluz committed Jul 18, 2024
2 parents a3c52fb + 717f5e8 commit 617219b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/views/crud/form_theme.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@

{% set maxKey = 0 %}
{% for key in form.children|keys %}
{% if key matches '/^\d+$/' %}
{% if key matches '/^\\d+$/' %}
{% set intKey = key|number_format(0, '', '', '') %}
{% if intKey > maxKey %}
{% set maxKey = intKey %}
Expand Down

0 comments on commit 617219b

Please sign in to comment.