Fix broken custom comboboxes when adding postings to transaction
This commit is contained in:
parent
9f72404aed
commit
e19856ae7d
@ -35,8 +35,7 @@ function updateComboboxInputs(elCombobox, elInput) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init combobox
|
function initCombobox(elCombobox) {
|
||||||
document.querySelectorAll('.combobox').forEach((elCombobox) => {
|
|
||||||
const elInput = elCombobox.querySelector('input');
|
const elInput = elCombobox.querySelector('input');
|
||||||
updateComboboxInputs(elCombobox, elInput);
|
updateComboboxInputs(elCombobox, elInput);
|
||||||
|
|
||||||
@ -58,4 +57,7 @@ document.querySelectorAll('.combobox').forEach((elCombobox) => {
|
|||||||
updateComboboxInputs(elCombobox, elInput);
|
updateComboboxInputs(elCombobox, elInput);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
|
// Init comboboxes
|
||||||
|
document.querySelectorAll('.combobox').forEach(initCombox);
|
||||||
|
@ -217,6 +217,9 @@
|
|||||||
let trNew = document.createElement('tr');
|
let trNew = document.createElement('tr');
|
||||||
trNew.innerHTML = document.getElementById(sign === 'dr' ? 'template-dr' : 'template-cr').querySelector('tr').innerHTML;
|
trNew.innerHTML = document.getElementById(sign === 'dr' ? 'template-dr' : 'template-cr').querySelector('tr').innerHTML;
|
||||||
trPosting.after(trNew);
|
trPosting.after(trNew);
|
||||||
|
|
||||||
|
// Initialise new combobox
|
||||||
|
initCombobox(trNew.querySelector('.combobox'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeAmount(el) {
|
function changeAmount(el) {
|
||||||
|
Loading…
Reference in New Issue
Block a user