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[]
|
data: NavigationTree[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const scrollToItem = (id: string) => {
|
function scrollToItem(id: string) {
|
||||||
const element = document.getElementById(id);
|
document.getElementById(id)?.scrollIntoView();
|
||||||
|
}
|
||||||
|
|
||||||
element?.scrollIntoView();
|
function getSelectedNode(data: NavigationTree[]) {
|
||||||
};
|
|
||||||
|
|
||||||
const getSelectedNode = (data: NavigationTree[]) => {
|
|
||||||
return deepDash.findDeep(data, (value, key) => key === "selected" && value === true)?.parent;
|
return deepDash.findDeep(data, (value, key) => key === "selected" && value === true)?.parent;
|
||||||
};
|
}
|
||||||
|
|
||||||
export function RecursiveTreeView({ data }: Props) {
|
export function RecursiveTreeView({ data }: Props) {
|
||||||
const [expanded, setExpanded] = React.useState<string[]>([]);
|
const [expanded, setExpanded] = React.useState<string[]>([]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user