Skip to main content

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​

ParameterTypeDescription
filterFunc(entry: SidebarEntryProps) => SidebarEntryProps | nulla 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));