WidgetExclusive Class
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.
Index
Methods
cancelExclusive
-
itemExclusive
Cancels the exclusive state of an widget.
Parameters:
-
itemExclusive
ObjectThe 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
ObjectObject containing the current set of properties.
filterExclusive
-
items
Filters the items and returns only those with exclusive state.
Parameters:
-
items
ArrayThe widgets to be filtered.
Returns:
The item with executive state.
mergeExclusiveProps
-
obj
-
itemKey
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
ObjectThe properties container which should be merged with the properties, related to exclusive state.
-
itemKey
ObjectThey key of an React Widget which should be rendered exclusively.
Returns:
The merged object.
requestExclusive
-
itemExclusive
Requests and sets exclusive state of an widget.
Parameters:
-
itemExclusive
ObjectThe widget which requests exclusive state.