Skip to content

filterSlashMenuItems

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/packages/editor/src/plugins/slash-menu/index.tsx

Case-insensitive filter over registry items: matches label, keywords, and group. Empty query matches everything. Exported for tests.

Signature

ts
function filterSlashMenuItems(items: SlashMenuItem[], query: string): SlashMenuItem[]

Parameters

NameType
itemsSlashMenuItem[]
querystring

Returns: SlashMenuItem[]

Was this page helpful?

Download as PDF