跳到主要内容

ui/build/tree-select

ui/build/tree-select

Interfaces

BaseTreeItem

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:31

Base item structure used for initializing the tree

Type Parameters

Type Parameter
TMetadata

Properties

action?
optional action?: NodeActionCallback<TMetadata>;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:47

Optional action to render next to the node

children?
optional children?: BaseTreeItem<TMetadata>[];

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:41

Child items under this node

icon
icon: string;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:39

Icon identifier for the node

id
id: string;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:33

Unique identifier for the node

metadata
metadata: TMetadata;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:45

Custom metadata associated with this item

required?
optional required?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:43

Whether this item is required (when in multiple selection mode)

searchText?
optional searchText?: string;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:37

Additional aliases and metadata included when filtering the tree

title
title: string;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:35

Display text for the node


TreeSelectProps

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:52

Props interface for the TreeSelect component

Type Parameters

Type Parameter
TMetadata

Properties

containerClass?
optional containerClass?: string;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:68

Additional CSS class for the container

disabled?
optional disabled?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:60

Disable all interactions and focus

multiple?
optional multiple?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:70

Whether to allow multiple selection

onChange?
optional onChange?: (state) => void;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:58

Callback when selection changes

Parameters
Parameter Type
state { disabled: readonly string[]; selected: readonly string[]; }
state.disabled readonly string[]
state.selected readonly string[]
Returns

void

readonly?
optional readonly?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:62

Prevent selection changes but allow navigation/expand

rootItems
rootItems: readonly BaseTreeItem<TMetadata>[];

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:54

Root items to display in the tree

searchPlaceholder?
optional searchPlaceholder?: string;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:66

Placeholder shown in the search input

showSearch?
optional showSearch?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:64

Whether to show the search input

value?
optional value?: object;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:56

Selection state (bindable)

disabled
readonly disabled: readonly string[];
selected
readonly selected: readonly string[];

Type Aliases

NodeActionCallback

type NodeActionCallback<TMetadata> = (node) =>
  | ConfirmationProps<Component<Record<string, unknown>>>
  | ConfirmationProps<unknown>
  | string;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:27

Callback type for node actions

Type Parameters

Type Parameter
TMetadata

Parameters

Parameter Type
node TreeNodes<TMetadata>

Returns

| ConfirmationProps<Component<Record<string, unknown>>> | ConfirmationProps<unknown> | string


SelectionState

type SelectionState = typeof SelectionStateSchema.Type;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:23


TreeNodes

type TreeNodes<TMetadata> =
  | ConfirmationProps<TMetadata>
  | ConfirmationProps<TMetadata>
| ConfirmationProps<TMetadata>;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:15

Type Parameters

Type Parameter
TMetadata

TreeSelectStateProps

type TreeSelectStateProps<TMetadata> = TreeSelectProps<TMetadata>;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:75

Props interface for TreeState initialization

Type Parameters

Type Parameter
TMetadata

Variables

AUTO_SCROLL_THRESHOLD

const AUTO_SCROLL_THRESHOLD: 0.2 = 0.2;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:12

Threshold percentage (0-1) from viewport edge that triggers auto-scroll 0.2 means scrolling starts when element is within 20% of the viewport edge


isParentNode

const isParentNode: typeof ConfirmationProps;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:14


isRequiredChildNode

const isRequiredChildNode: typeof ConfirmationProps;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:13


ROOT_NODE_ID

const ROOT_NODE_ID: "ROOT" = "ROOT";

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:7


SelectionStateSchema

const SelectionStateSchema: Schema.Struct<{
  disabled: Schema.$Array<Schema.String>;
  selected: Schema.$Array<Schema.String>;
}>;

Defined in: apps/website/.api-docs-entry/ui/build/tree-select/index.d.ts:19

Selection state interface defining which nodes are selected or disabled

References

RequiredTreeChildNode

Renames and re-exports ConfirmationProps


TreeChildNode

Renames and re-exports ConfirmationProps


TreeParentNode

Renames and re-exports ConfirmationProps


TreeState

Renames and re-exports ConfirmationProps