mirror of
https://github.com/ONLYOFFICE/sdkjs-forms.git
synced 2026-03-31 10:23:35 +08:00
[oform] Fix weight when add a field group
This commit is contained in:
@ -372,7 +372,7 @@
|
||||
for (let index = 0, count = this.FieldGroups.length; index < count; ++index)
|
||||
{
|
||||
let curWeight = this.FieldGroups[index].getWeight();
|
||||
if (max > curWeight)
|
||||
if (max < curWeight)
|
||||
max = curWeight;
|
||||
}
|
||||
|
||||
|
||||
@ -241,6 +241,7 @@
|
||||
|
||||
// Нельзя, чтобы групп не было вообще
|
||||
let defaultGroup = new AscOForm.CFieldGroup();
|
||||
defaultGroup.setWeight(this.Format.getMaxWeight() + 1);
|
||||
this.Format.addFieldGroup(defaultGroup);
|
||||
defaultGroup.addUser(this.Format.getDefaultUser());
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user