mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +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);
|
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
|
let
|
||||||
@ -84,3 +82,12 @@ inputs.forEach(el => {
|
|||||||
.component('app', App)
|
.component('app', App)
|
||||||
.mount(container);
|
.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