Skip to content

Commit

Permalink
fix: dexie update hook
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Mar 10, 2023
1 parent c935d86 commit 86c0c59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
[nzSelectedKeys]="nzSelectedKeys"
#apiGroup
[nzSearchValue]="searchValue"
[nzSearchFunc]="searchFunc"
[nzHideUnMatched]="true"
[(nzExpandedKeys)]="expandKeys"
(nzClick)="clickTreeItem($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { eoDeepCopy, waitNextTick } from 'eo/workbench/browser/src/app/utils/ind
import { getExpandGroupByKey } from 'eo/workbench/browser/src/app/utils/tree/tree.utils';
import { autorun, reaction } from 'mobx';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { NzTreeComponent, NzFormatEmitEvent } from 'ng-zorro-antd/tree';
import { NzTreeComponent, NzFormatEmitEvent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';

import { ElectronService } from '../../../../../../../core/services';
import { ProjectApiService } from '../../../api.service';
Expand Down Expand Up @@ -42,6 +42,11 @@ export class ApiGroupTreeComponent implements OnInit {
requestMethodMap = requestMethodMap;
nzSelectedKeys = [];
searchValue = '';
searchFunc = (node: NzTreeNodeOptions) => {
const { uri, name, title } = node;
// console.log('node', uri, name, title);
return [uri, name, title].some(n => n?.includes?.(this.searchValue));
};
isLoading = true;
isEdit: boolean;
apiGroupTree = [];
Expand Down

0 comments on commit 86c0c59

Please sign in to comment.