mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Revert changes in sidebar-items.injectable
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
2852a4f8d2
commit
06fd0e2b37
@ -17,8 +17,6 @@ import {
|
||||
orderBy,
|
||||
some,
|
||||
} from "lodash/fp";
|
||||
import sidebarStorageInjectable, { SidebarStorageState } from "./sidebar-storage/sidebar-storage.injectable";
|
||||
import type { StorageLayer } from "../../utils";
|
||||
|
||||
export interface SidebarItemRegistration {
|
||||
id: string;
|
||||
@ -46,7 +44,6 @@ const sidebarItemsInjectable = getInjectable({
|
||||
|
||||
instantiate: (di) => {
|
||||
const computedInjectMany = di.inject(computedInjectManyInjectable);
|
||||
const sidebarStorage: StorageLayer<SidebarStorageState> = di.inject(sidebarStorageInjectable)
|
||||
const sidebarItemRegistrations = computedInjectMany(sidebarItemsInjectionToken);
|
||||
|
||||
return computed((): HierarchicalSidebarItem[] => {
|
||||
@ -65,8 +62,6 @@ const sidebarItemsInjectable = getInjectable({
|
||||
map((registration) => {
|
||||
const children = _getSidebarItemsHierarchy(registration.id);
|
||||
|
||||
const parentExpanded = () => Boolean(sidebarStorage.get().expanded[registration.id])
|
||||
|
||||
return {
|
||||
registration,
|
||||
children,
|
||||
@ -80,7 +75,6 @@ const sidebarItemsInjectable = getInjectable({
|
||||
children,
|
||||
invokeMap("isActive.get"),
|
||||
some(identity),
|
||||
(identityFound) => identityFound && !parentExpanded(),
|
||||
);
|
||||
}),
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user