JS: init live validation on blockwidget's widgets when row is added (#78227) #367
Loading…
Reference in New Issue
No description provided.
Delete Branch "wip/78227-BlockWidget-liveValidation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Où je découvre que la méthode trigger de jQuery n'est pas compatible avec addEventListener, j'ai donc ajouté un customEvent natif 'wcs:block-row-added'.
Plutôt "forms:", ou "blocks:", que "JS:" comme préfixe au message de commit.
@ -755,2 +755,3 @@
add_js_behaviours($('[data-field-id="' + block_id + '"]'));
$('form').trigger('wcs:block-row-added');
$form.trigger('wcs:block-row-added');
$form[0].dispatchEvent(new CustomEvent('wcs:block-row-added', { detail: { newBlock: $new_block[0] } } ))
Par uniformité avec le code environnant j'aurais laissé un point-virgule; mais total détail.
d0f9542e5b
tod122cac45a
semi-colon et message corrigé.