Show:

Provides functionality for managing different dropdowns inside a widget.

Methods

componentWillReceiveProps

()

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

getInitialState

()

Lifecycle. Invoked once before the component is mounted.

mergeDropdownProps

(
  • obj
  • itemKey
)
Object

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
)

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.