mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
mod input address: add an event listener to add this component for collections
This commit is contained in:
parent
f6806f7743
commit
816855e6f8
@ -5,11 +5,9 @@ import App from './App.vue';
|
||||
|
||||
const i18n = _createI18n(addressMessages);
|
||||
|
||||
let inputs = document.querySelectorAll('input[type="hidden"][data-input-address]');
|
||||
const addAddressInput = (inputs) => {
|
||||
|
||||
const isNumeric = function(v) { return !isNaN(v); };
|
||||
|
||||
inputs.forEach(el => {
|
||||
inputs.forEach(el => {
|
||||
let
|
||||
addressId = el.value,
|
||||
uniqid = el.dataset.inputAddress,
|
||||
@ -83,4 +81,13 @@ inputs.forEach(el => {
|
||||
.use(i18n)
|
||||
.component('app', App)
|
||||
.mount(container);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
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]'))
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user