frontend


frontend / api/analytics/search / getTopItems

Function: getTopItems()

getTopItems(opts?): Promise<ItemRef[]>

Defined in: src/api/analytics/search.ts:38

Fetch a small list of items (generic dropdowns; may be supplier-scoped). Returns array of {id, name}. Empty array on errors.

Parameters

opts?

limit?

number

supplierId?

string

Returns

Promise<ItemRef[]>

Example

const items = await getTopItems({ supplierId: 'SUP-001', limit: 30 });
return <Select options={items} />;