Class: ModalContainer

GlobalComponents. ModalContainer


new ModalContainer()

A container component for configurable modals

Source:
See:

Methods


<private, static> _buildButtons()

Determine which, if any, buttons to display

Source:
Returns:
Type
jsx

<private, static> _callUserFunc(propName)

Fire the selected user function, if it's provided

Parameters:
Name Type Description
propName string
Source:
Returns:
Type
null

<private, static> _shouldDisableButton()

Determine if we should disable the button

Source:
Returns:
Type
string

<private, static> _shouldRenderOverlay()

Determine whether the modal is open and we should render the overlay

Source:
Returns:
Type
jsx

<static> cancelButton()

Return cancel button jsx

Source:
Returns:
Type
jsx

<static> closeModal()

Close the modal and fire appropriate user functions

Source:
Returns:
Type
null

<static> componentDidMount()

When the component mounts, an event listener is attached to the window
to track keyup events, and filter them into this component's handleKeyUp function.

Source:
Returns:
Type
null

<static> componentWillUnmount()

When the component is unmounted, the window's KeyUp listener is removed

Source:
Returns:
Type
null

<static> getInitialState()

getInitialState

Source:
Returns:
Type
object

<static> handleClick(event)

A click listener attached to the modal.
Every time a click happens, this function checks to see if the click was on the modal dialog,
or outside of it.

If the click is outside of the dialog, we close the modal without saving.

Parameters:
Name Type Description
event event

The click event

Source:
Returns:

null


<static> handleKeyUp(event)

A keyup listener attached to the modal.
Every time a key is released, this function checks to see if it was the 'ESC' key.
If the 'ESC' was released, we close the modal.

Parameters:
Name Type Description
event event

The keyup event

Source:
Returns:

null


<static> openModal()

Open the modal and fire appropriate user functions

Source:
To Do:
  • this isn't being fired

<static> render()

Renders the Modal.

Source:
Returns:
Type
jsx

<static> saveButton()

Return save button jsx

Source:
Returns:
Type
jsx

<static> saveModal()

Save modal and fire the appropriate user functions

Source:
Returns:
Type
null