提交 89220693 编写于 作者: R Rob Lourens

Settings editor - header rows should not be selectable

上级 bd262c9a
......@@ -1553,4 +1553,45 @@ export class SettingsTree extends NonExpandableTree {
this.style(colors);
}));
}
public setFocus(element?: any, eventPayload?: any): void {
if (element instanceof SettingsTreeGroupElement) {
const nav = this.getNavigator(element, false);
do {
element = nav.next();
} while (element instanceof SettingsTreeGroupElement);
}
super.setFocus(element, eventPayload);
}
public focusNext(count?: number, eventPayload?: any): void {
const focus = this.getFocus();
if (!focus) {
return super.focusFirst();
}
const nav = this.getNavigator(focus, false);
let current;
do {
current = nav.next();
} while (current instanceof SettingsTreeGroupElement);
this.setFocus(current, eventPayload);
}
public focusPrevious(count?: number, eventPayload?: any): void {
const focus = this.getFocus();
if (!focus) {
return super.focusFirst();
}
const nav = this.getNavigator(focus, false);
let current;
do {
current = nav.previous();
} while (current instanceof SettingsTreeGroupElement);
this.setFocus(current, eventPayload);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册