Skip to content

Commit

Permalink
JS changes
Browse files Browse the repository at this point in the history
  • Loading branch information
liszkapawel committed Aug 24, 2022
1 parent 313c295 commit 13cc2f3
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/Resources/assets/admin/automaticBlacklistingConfiguration.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
const addRuleBtn = document.querySelector('[data-form-collection="add"]');
$(() => {
const addRuleBtn = document.querySelector('[data-form-collection="add"]');

const turnOnListener = () => {
addRuleBtn?.addEventListener('click', () => {
setTimeout(() => {
const turnOnListener = () => {
addRuleBtn?.addEventListener('click', () => {
const configurationTypeSelects = document.querySelectorAll('[data-form-collection="update"]');
const changeEvent = new Event('change', { 'bubbles': true });

configurationTypeSelects[configurationTypeSelects.length - 1].dispatchEvent(changeEvent);
}, 100);
});
}
});
}

turnOnListener();
})

turnOnListener();

0 comments on commit 13cc2f3

Please sign in to comment.