fix(mass-input): defaultValue is safe

This commit is contained in:
Gregor Kleen 2020-04-19 18:20:40 +02:00
parent 743e67a01c
commit 03f36aea1f

View File

@ -91,7 +91,7 @@ export class MassInput {
let changedAdd = this._changedAdd;
Array.from(this._element.querySelectorAll(MASS_INPUT_ADD_CELL_SELECTOR)).forEach(addCell => addCell.querySelectorAll('input:not([type=checkbox]):not([type=radio])').forEach(inputElem => {
if (inputElem.closest('[uw-mass-input]') === this._element && inputElem.value !== '')
if (inputElem.closest('[uw-mass-input]') === this._element && inputElem.value !== '' && (inputElem.defaultValue || inputElem.getAttribute('value')) !== inputElem.value)
changedAdd.push(addCell);
}));