Select Class
Nice select for react.
Copyright (c) 2016 ItsAsbreuk - http://itsasbreuk.nl
New BSD License - http://choosealicense.com/licenses/bsd-3-clause/
Item Index
Methods
Methods
_defaultItemRenderer
-
String|Object
Returns a html that represent the item as how it should be rendered.
Parameters:
-
String|ObjectObjectlist-item
Returns:
String html that represent the item
_getUlContainerNode
()
private
Returns the ul-element that contains all li-elements.
Returns:
Element
_handleDocumentClick
-
Object
Callback for a click on the document. Is needed to close the Component when clicked outside.
Parameters:
-
ObjectObjecte
_saveHTML
-
String
Returns a save string
Parameters:
-
StringObjecthtml the text that should be removed from any html-entities
Returns:
String
componentDidMount
()
componentDidMount does some initialization.
componentWillUnmount
()
componentWilUnmount does some cleanup.
focus
-
[transitionTime]
Sets the focus on the Component.
Parameters:
-
[transitionTime]Number optionaltransition-time to focus the element into the view
handleClick
()
Callback-fn for the onClick-event.
Will invoke this.props.onChange
handleContainerFocus
-
e
Callback that sets the focus to the descendent element by calling focus()
Parameters:
-
eObjectevent-payload
handleItemClick
()
Callback-fn when an item is clicked
handleItemScroll
()
Callback-fn when an item is scrolled by keys
handleKeyDown
()
Callback-fn for the onKeyDown-event.
handleKeyUp
()
Callback-fn for the onKeyUp-event.
handleMouseDown
()
Callback-fn for the onMouseDown-event.
handleMouseUp
()
Callback-fn for the onMouseUp-event.
render
()
React render-method --> renderes the Component.
Returns:
ReactComponent
Properties
btnRenderer
Function
A render-function for the buttonText. When not supplied (default), The selected item will be rendered as the buttonText.
closeOnClick
Boolean
Whether the dropdown-list should be collapsed when an item is clicked.
Default: true
emptyHTML
String
The HTML that the select should show when no item is selected. Defaults "Choose..."
formValidated
Boolean
Whether the parent-form has been validated. This value is needed to determine if the validate-status should be set.
listHeight
Number
The height of the select-list. If not set, then all items are shown without a scroller.
markValidated
Boolean
Whether the Component should show an validate-reclamation (star) when it requires a selected item yet when there is no item selected.