Skip to content

Commit

Permalink
fix: api group tree sort not save
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Aug 3, 2022
1 parent df90360 commit 9339351
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ export class ApiGroupTreeComponent implements OnInit, OnDestroy {
* @param data GroupApiDataModel
*/
updateoperateApiEvent(data: GroupApiDataModel) {
let count = 0;
if (data.group.length > 0) {
count++;
console.log('data.group', data.group);
this.storage.run(
'groupBulkUpdate',
Expand All @@ -361,11 +363,14 @@ export class ApiGroupTreeComponent implements OnInit, OnDestroy {
})),
],
(result: StorageRes) => {
this.buildGroupTreeData();
if (--count === 0) {
this.buildGroupTreeData();
}
}
);
}
if (data.api.length > 0) {
count++;
console.log('data.api', data.api);
this.storage.run(
'apiDataBulkUpdate',
Expand All @@ -377,7 +382,9 @@ export class ApiGroupTreeComponent implements OnInit, OnDestroy {
})),
],
(result: StorageRes) => {
this.buildGroupTreeData();
if (--count === 0) {
this.buildGroupTreeData();
}
}
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { EoMessageService } from 'eo/workbench/browser/src/app/eoui/message/eo-m
import { transferFileToDataUrl } from 'eo/workbench/browser/src/app/utils';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { EoMonacoEditorComponent } from 'eo/workbench/browser/src/app/shared/components/monaco-editor/monaco-editor.component';
import { EditorOptions, JoinedEditorOptions } from 'ng-zorro-antd/code-editor';
import { EditorOptions } from 'ng-zorro-antd/code-editor';

@Component({
selector: 'eo-api-test-body',
Expand Down

0 comments on commit 9339351

Please sign in to comment.