add mod_input_address_index to collection event: better addition of the event listener to the DOM

This commit is contained in:
nobohan 2021-10-28 08:07:01 +02:00
parent 816855e6f8
commit c90f9ee5bc

View File

@ -88,6 +88,6 @@ document.addEventListener('DOMContentLoaded', (_e) =>
addAddressInput(document.querySelectorAll('input[type="hidden"][data-input-address]'))
);
window.addEventListener('collection-add-entry', (_e) =>
addAddressInput(document.querySelectorAll('input[type="hidden"][data-input-address]'))
window.addEventListener('collection-add-entry', (e) =>
addAddressInput(e.detail.entry.querySelectorAll('input[type="hidden"][data-input-address]'))
);