Fix race condition in ChillCollectionType

In some dcase, the collection is not initialized when a showHide is launched before the collection is fully initialized.
This commit is contained in:
2024-10-15 09:08:29 +02:00
parent 1313b6f138
commit 13dbbb6741
4 changed files with 37 additions and 4 deletions

View File

@@ -163,6 +163,7 @@
<div class="chill-collection">
<ul class="list-entry"
{{ form.vars.js_caller }}="{{ form.vars.js_caller }}"
data-uniqid="{{ form.vars.uniqid|escape('html_attr') }}"
data-collection-name="{{ form.vars.name|escape('html_attr') }}"
data-collection-identifier="{{ form.vars.identifier|escape('html_attr') }}"
data-collection-button-remove-label="{{ form.vars.button_remove_label|trans|e }}"
@@ -184,6 +185,8 @@
{% if form.vars.allow_add == 1 %}
<button class="add-entry btn btn-misc"
type="button"
data-uniqid="{{ form.vars.uniqid|escape('html_attr') }}"
data-collection-add-target="{{ form.vars.name|escape('html_attr') }}"
data-form-prototype="{{ ('<div>' ~ form_widget(form.vars.prototype) ~ '</div>')|escape('html_attr') }}" >
<i class="fa fa-plus fa-fw"></i>