Skip to main content

Function: registerHomeSidebarEntryFilter()

function registerHomeSidebarEntryFilter(filterFunc: (entry: SidebarEntryProps) => SidebarEntryProps | null): void;

Defined in: plugin/registry.tsx:425

Filter HOME sidebar menu items (return null to remove, or return a modified entry to update it).

Parameters​

ParameterTypeDescription
filterFunc(entry: SidebarEntryProps) => SidebarEntryProps | nulla function for filtering or modifying HOME sidebar entries. Return null to remove the entry, or the (optionally modified) entry to keep it.

Returns​

void

Example​

import { registerHomeSidebarEntryFilter } from '@kinvolk/headlamp-plugin/lib';

registerHomeSidebarEntryFilter(entry => (entry.name === 'settings' ? null : entry));