mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Small cleaning
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
31fd3a351e
commit
edfae3212d
@ -23,15 +23,13 @@ interface Props {
|
||||
data: NavigationTree[]
|
||||
}
|
||||
|
||||
const scrollToItem = (id: string) => {
|
||||
const element = document.getElementById(id);
|
||||
function scrollToItem(id: string) {
|
||||
document.getElementById(id)?.scrollIntoView();
|
||||
}
|
||||
|
||||
element?.scrollIntoView();
|
||||
};
|
||||
|
||||
const getSelectedNode = (data: NavigationTree[]) => {
|
||||
function getSelectedNode(data: NavigationTree[]) {
|
||||
return deepDash.findDeep(data, (value, key) => key === "selected" && value === true)?.parent;
|
||||
};
|
||||
}
|
||||
|
||||
export function RecursiveTreeView({ data }: Props) {
|
||||
const [expanded, setExpanded] = React.useState<string[]>([]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user