mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
loop backwards
This commit is contained in:
committed by
Aiden McClelland
parent
698b0d97e5
commit
2bbb4206ea
@@ -237,11 +237,11 @@ export class FormObjectComponent {
|
|||||||
private updateEnumList (key: string, current: string[], updated: string[]) {
|
private updateEnumList (key: string, current: string[], updated: string[]) {
|
||||||
this.formGroup.get(key).markAsDirty()
|
this.formGroup.get(key).markAsDirty()
|
||||||
|
|
||||||
current.forEach((val, index) => {
|
for (let i = current.length - 1; i >= 0; i--) {
|
||||||
if (!updated.includes(val)) {
|
if (!updated.includes(current[i])) {
|
||||||
this.deleteListItem(key, index, false)
|
this.deleteListItem(key, i, false)
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
updated.forEach(val => {
|
updated.forEach(val => {
|
||||||
if (!current.includes(val)) {
|
if (!current.includes(val)) {
|
||||||
@@ -250,7 +250,7 @@ export class FormObjectComponent {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private getDocSize (selected: string) {
|
private getDocSize (selected: string) {
|
||||||
const element = document.getElementById(selected)
|
const element = document.getElementById(selected)
|
||||||
return `${element.scrollHeight}px`
|
return `${element.scrollHeight}px`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user