1
0
Fork 0

FIX: Ensure we always progress index

Dieser Commit ist enthalten in:
Angus McLeod 2022-04-04 12:15:13 +02:00
Ursprung cd43cdd29b
Commit 0b6ba868ce

Datei anzeigen

@ -78,16 +78,9 @@ export default Component.extend({
let params = setWizardDefaults({}, itemType);
params.isNew = true;
params.index = items.length;
let index = 0;
if (items.length) {
let last_item = items[items.length - 1];
index = Number(last_item.id.split("_").pop());
}
params.index = index;
let id = `${itemType}_${index + 1}`;
let id = `${itemType}_${params.index + 1}`;
if (itemType === "field") {
id = `${this.parentId}_${id}`;
}