提交 08c54c7e 编写于 作者: R Rob Lourens

Fix #57350 - don't show twistie for TOC elements with only filtered children

上级 af243726
......@@ -92,8 +92,16 @@ export class TOCDataSource implements IDataSource {
}
hasChildren(tree: ITree, element: TOCTreeElement): boolean {
return element instanceof TOCTreeModel ||
(element instanceof SettingsTreeGroupElement && element.children && element.children.some(child => child instanceof SettingsTreeGroupElement));
if (element instanceof TOCTreeModel) {
return true;
}
if (element instanceof SettingsTreeGroupElement) {
// Should have child which won't be filtered out (undefined or >0 count)
return element.children && element.children.some(child => child instanceof SettingsTreeGroupElement && child.count !== 0);
}
return false;
}
getChildren(tree: ITree, element: TOCTreeElement): TPromise<SettingsTreeElement[]> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册