Skip to content

ui/build/combobox/types

ui/build/combobox/types

Interfaces

TInfiniteLoadingConfig

Defined in: apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:57

Configuration for the infinite loading feature. When provided, the component will monitor scroll position and request more data as needed.

Properties

handleInfiniteLoad
handleInfiniteLoad: (info) => void;

Defined in: apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:69

A callback function triggered when the user scrolls near the end of the list. The parent component is responsible for fetching more data and updating the options prop.

Parameters
Parameter Type Description
info { lastVirtualIndex: number; loadedCount: number; } Details about the current state for fetching.
info.lastVirtualIndex number The index of the last rendered virtual item.
info.loadedCount number The number of items currently loaded in the component.
Returns

void

hasMore
hasMore: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:61

A boolean indicating if there are more items to fetch.

total
total: number;

Defined in: apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:59

The total number of items available on the server.

Type Aliases

TComboboxCommandItem

type TComboboxCommandItem<T, TAdditionalProps> =
  | {
  _groupName: string;
  _type: "group";
  disabled: boolean;
  label: string;
  value: string;
}
  | {
  _allSelected: boolean;
  _selectedCount: number;
  _totalCount: number;
  _type: "select-all";
  label: string;
  value: string;
}
  | {
  _option: TOption<T, TAdditionalProps>;
  _type: "option";
  label: string;
  value: string;
}
  | {
  _type: "create";
  label: string;
  value: string;
};

Defined in: apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:30

Type Parameters

Type Parameter
T
TAdditionalProps extends Record<string, unknown>

TComboboxProps

type TComboboxProps<T, TAdditionalProps, TMultiple> = TComboboxBaseProps<T, TAdditionalProps, TMultiple> & TComboboxClientProps | TComboboxServerProps;

Defined in: apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:214

A discriminated union of combobox properties, providing strong type-safety based on the filtering type.

Type Parameters

Type Parameter Default type Description
T - The underlying data type of an option's value.
TAdditionalProps extends Record<string, unknown> - A record of extra props for the option label snippet.
TMultiple extends boolean false A boolean indicating if multi-select is enabled.

TOption

type TOption<T, AP> = object;

Defined in: apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:7

Represents a single selectable option within the combobox.

Type Parameters

Type Parameter Description
T The underlying data type of the option's value.
AP extends Record<string, unknown> A record of additional properties for custom label rendering.

Properties

Property Type Description Defined in
additionalLabelProps? AP Extra props to be spread into the label snippet for custom rendering. apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:9
badge? string Optional compact trailing label shown in the dropdown. apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:26
description? string An optional longer description for the option. apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:22
icon? string Optional leading Iconify icon shown in the dropdown. apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:24
label Snippet<[T, AP, (e) => void]> | string The display label for the option. Can be a simple string or a Svelte Snippet for complex, custom rendering. apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:14
search_term? string Additional text to be included during client-side filtering. apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:28
type? string An optional category to group the option under. apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:20
value T The unique value of the option. apps/website/.api-docs-entry/ui/build/combobox/types.d.ts:18