# TreeViewItemArgs

Interface · extends [`ContainerArgs`](https://api.playcanvas.com/pcui/interfaces/ContainerArgs.md)

Source: https://github.com/playcanvas/pcui/blob/77ed2b8ba8660c9644049b0d1942652721e7a6c4/src/components/TreeViewItem/index.ts#L39

The arguments for the [TreeViewItem](https://api.playcanvas.com/pcui/classes/TreeViewItem.md) constructor.

## Properties

### allowDrag

```ts
allowDrag?: boolean
```

Whether this [TreeViewItem](https://api.playcanvas.com/pcui/classes/TreeViewItem.md) can be dragged. Only considered if the parent [TreeView](https://api.playcanvas.com/pcui/classes/TreeView.md)
has `allowDrag` set to `true`. Defaults to `true`.

### allowDrop

```ts
allowDrop?: boolean
```

Whether dropping is allowed on the [TreeViewItem](https://api.playcanvas.com/pcui/classes/TreeViewItem.md). Defaults to `true`.

### allowSelect

```ts
allowSelect?: boolean
```

Whether the item can be selected. Defaults to `true`.

### icon

```ts
icon?: string
```

The icon shown before the text in the [TreeViewItem](https://api.playcanvas.com/pcui/classes/TreeViewItem.md). Defaults to 'E360'.

### onDeselect

```ts
onDeselect?: () => void
```

Method to be called when the [TreeViewItem](https://api.playcanvas.com/pcui/classes/TreeViewItem.md) is deselected.

### onSelect

```ts
onSelect?: (deselect: () => void) => void
```

Method to be called when the [TreeViewItem](https://api.playcanvas.com/pcui/classes/TreeViewItem.md) is selected.

### open

```ts
open?: boolean
```

Whether the item is open (showing its children). Defaults to `false`.

### selected

```ts
selected?: boolean
```

Whether the item is selected.

### text

```ts
text?: string
```

The text shown by the [TreeViewItem](https://api.playcanvas.com/pcui/classes/TreeViewItem.md).

## Inherited from [ContainerArgs](https://api.playcanvas.com/pcui/interfaces/ContainerArgs.md)

- `alignItems?: string`
- `alignSelf?: string`
- `binding?: BindingBase`
- `children?: ReactNode`
- `class?: string | string[]`
- `dom?: string | HTMLElement`
- `enabled?: boolean`
- `error?: boolean`
- `flex?: boolean`
- `flexBasis?: string | number`
- `flexDirection?: string`
- `flexGrow?: string | number`
- `flexShrink?: string | number`
- `flexWrap?: string`
- `grid?: boolean`
- `height?: number`
- `hidden?: boolean`
- `id?: string`
- `ignoreParent?: boolean`
- `isRoot?: boolean`
- `justifyContent?: string`
- `justifySelf?: string`
- `link?: { observer: Observer | Observer[]; path: string | string[] }`
- `onChange?: (value: unknown) => void`
- `onClick?: () => void`
- `onRemove?: () => void`
- `onResize?: () => void`
- `parent?: Element`
- `readOnly?: boolean`
- `resizable?: string`
- `resizeMax?: number`
- `resizeMin?: number`
- `scrollable?: boolean`
- `style?: string`
- `tabIndex?: number`
- `width?: number`
