Skip to content

Commit

Permalink
fix: extension-tree select issue
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Feb 9, 2023
1 parent d3e6f1a commit 8b7d9a8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ export class ExtensionListComponent implements OnInit {
const notCompleteSuggest = suggestList.some(n => n.startsWith(this.keyword) && this.keyword !== n);
if (notCompleteSuggest) return;
}

const originType = this.type;
let type = this.type;
if (type.startsWith(ContributionPointsPrefix.category)) {
type = 'category';
this.category = this.type.slice(ContributionPointsPrefix.category.length);
}
this.extensionList = [];
this.extensionList = await this.searchPlugin(type, { keyword: this.keyword, category: this.category });
const data = await this.searchPlugin(type, { keyword: this.keyword, category: this.category });
// 避免频繁切换,导致侧边栏选中状态与右侧展示不一致
if (originType === this.type) {
this.extensionList = data;
}
});
}
clickExtension(event: MouseEvent, item, nzSelectedIndex?) {
Expand Down

0 comments on commit 8b7d9a8

Please sign in to comment.