FIX: Ensure we always progress index
Dieser Commit ist enthalten in:
Ursprung
cd43cdd29b
Commit
0b6ba868ce
1 geänderte Dateien mit 2 neuen und 9 gelöschten Zeilen
|
@ -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}`;
|
||||
}
|
||||
|
|
Laden …
In neuem Issue referenzieren