Show:

Provides functionality for managing exclusive state of an widget. The exclusive state means that a button may request to be the only rendered widget in its parent container. WidgetExclusive will manage this state by filtering and suppressing the other sibling widgets from displaying.

Methods

cancelExclusive

(
  • itemExclusive
)

Cancels the exclusive state of an widget.

Parameters:

  • itemExclusive Object

    The widget which exclusive state should be canceled.

componentWillReceiveProps

(
  • nextProps
)

Lifecycle. Invoked when a component is receiving new props. This method is not called for the initial render. Calling this.setState() within this function will not trigger an additional render.

Parameters:

  • nextProps Object

    Object containing the current set of properties.

filterExclusive

(
  • items
)
Array | Object

Filters the items and returns only those with exclusive state.

Parameters:

  • items Array

    The widgets to be filtered.

Returns:

Array | Object:

The item with executive state.

mergeExclusiveProps

(
  • obj
  • itemKey
)
Object

Merges the provided object with three more properties:

  • cancelExclusive - function, which can be used by a widget in order to cancel executive state.
  • renderExclusive - boolean flag which indicates if an widget should be rendered exclusively.
  • requestExclusive - function, which can be used by a widget in order to obtain exclusive state.

Parameters:

  • obj Object

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

  • itemKey Object

    They key of an React Widget which should be rendered exclusively.

Returns:

Object:

The merged object.

requestExclusive

(
  • itemExclusive
)

Requests and sets exclusive state of an widget.

Parameters:

  • itemExclusive Object

    The widget which requests exclusive state.