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,9 +5,7 @@ import App from './App.vue';
|
||||
|
||||
const i18n = _createI18n(addressMessages);
|
||||
|
||||
let inputs = document.querySelectorAll('input[type="hidden"][data-input-address]');
|
||||
|
||||
const isNumeric = function(v) { return !isNaN(v); };
|
||||
const addAddressInput = (inputs) => {
|
||||
|
||||
inputs.forEach(el => {
|
||||
let
|
||||
@ -84,3 +82,12 @@ inputs.forEach(el => {
|
||||
.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