fix(partsTable): initialize new item matrice as empty and refresh on global filter change
- Default new items' matrice to empty to prevent stale values leaking from prior state - Force matrice update when the global filter changes to keep items in sync
This commit is contained in:
parent
8d6fe92481
commit
683073c244
@ -1339,6 +1339,7 @@ $(document).ready(function () {
|
||||
partId,
|
||||
currentValue,
|
||||
selectedMacro,
|
||||
true
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -1415,6 +1416,7 @@ $(document).ready(function () {
|
||||
partId,
|
||||
idmatrice,
|
||||
selectedMacro = null,
|
||||
fromFilter = false
|
||||
) {
|
||||
if (typeof $.fn.select2 === "undefined") {
|
||||
$select.replaceWith(
|
||||
@ -1484,13 +1486,18 @@ $(document).ready(function () {
|
||||
true,
|
||||
true,
|
||||
);
|
||||
$select.append(option).trigger("change");
|
||||
|
||||
if (!fromFilter) $select.append(option).trigger("change");
|
||||
else $select.append(option);
|
||||
|
||||
partMatrice[partNumber] = matrice.IdMatrice;
|
||||
} else {
|
||||
// Aggiusta valore non valido
|
||||
$select.val(null).trigger("change");
|
||||
partMatrice[partNumber] = null;
|
||||
}
|
||||
} else {
|
||||
$select.val(null).trigger("change");
|
||||
}
|
||||
|
||||
$select.on("change", function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user