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
|
||||
document.querySelectorAll('.combobox').forEach((elCombobox) => {
|
||||
function initCombobox(elCombobox) {
|
||||
const elInput = elCombobox.querySelector('input');
|
||||
updateComboboxInputs(elCombobox, elInput);
|
||||
|
||||
@ -58,4 +57,7 @@ document.querySelectorAll('.combobox').forEach((elCombobox) => {
|
||||
updateComboboxInputs(elCombobox, elInput);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Init comboboxes
|
||||
document.querySelectorAll('.combobox').forEach(initCombox);
|
||||
|
@ -217,6 +217,9 @@
|
||||
let trNew = document.createElement('tr');
|
||||
trNew.innerHTML = document.getElementById(sign === 'dr' ? 'template-dr' : 'template-cr').querySelector('tr').innerHTML;
|
||||
trPosting.after(trNew);
|
||||
|
||||
// Initialise new combobox
|
||||
initCombobox(trNew.querySelector('.combobox'));
|
||||
}
|
||||
|
||||
function changeAmount(el) {
|
||||
|
Loading…
Reference in New Issue
Block a user