Show: Inherited Protected Private Deprecated

# WidgetDropdown Class

Defined in: `src/ui/react/src/components/base/widget-dropdown.js:4`

Provides functionality for managing different dropdowns inside a widget.

## Index

### Methods

- componentWillReceiveProps
- getInitialState
- mergeDropdownProps
- toggleDropdown

## Methods

### `componentWillReceiveProps`

()

Defined in `src/ui/react/src/components/base/widget-dropdown.js:10`

Lifecycle. Invoked when a component is receiving new props. This method is not called for the initial render.

### `getInitialState`

()

Defined in `src/ui/react/src/components/base/widget-dropdown.js:23`

Lifecycle. Invoked once before the component is mounted.

### `mergeDropdownProps`

(

- `obj`
- `itemKey`

)
Object

Defined in `src/ui/react/src/components/base/widget-dropdown.js:35`

Merges the provided object with two more properties:

- expanded - boolean flag which indicates if an widget should be rendered exclusively.
- toggleDropdown - function, which can be used by an widget in order to obtain exclusive state.

#### Parameters:

- `obj` Object

  The properties container which should be merged with the properties, related to dropdown state.

- `itemKey` Object

  They key of an React Widget which contains the dropdown.

#### Returns:

Object:

The merged object.

### `toggleDropdown`

(

- `itemDropdown`
- `toggleDirection`

)

Defined in `src/ui/react/src/components/base/widget-dropdown.js:54`

Sets the active dropdown of the widget or discards the toggled item from the state.

#### Parameters:

- `itemDropdown` Object

  The widget which requests to toggle its dropdown.

- `toggleDirection` Number

  User movement direction when toggled via keyboard.