Function: registerSidebarEntryFilter()
function registerSidebarEntryFilter(filterFunc: (entry: SidebarEntryProps) => SidebarEntryProps | null): void;
Defined in: plugin/registry.tsx:406
Filter or modify IN_CLUSTER sidebar menu items.
Parameters
| Parameter | Type | Description |
|---|---|---|
filterFunc | (entry: SidebarEntryProps) => SidebarEntryProps | null | a function for filtering or modifying IN_CLUSTER sidebar entries. Return null to remove the entry, or the (optionally modified) entry to keep it. |
Returns
void
Example
import { registerSidebarEntryFilter } from '@kinvolk/headlamp-plugin/lib';
registerSidebarEntryFilter(entry => (entry.name === 'workloads' ? null : entry));