Button Class
React-Component: refined Button.
Copyright (c) 2016 ItsAsbreuk - http://itsasbreuk.nl
New BSD License - http://choosealicense.com/licenses/bsd-3-clause/
Item Index
Methods
Methods
_getDataAttrs
()
private
Extracts the data-*
attributes from props.
Returns:
object all the data-* attributes
_processKeyUp
-
Boolean
-
Boolean
-
Boolean
React render-method --> renderes the Component.
_saveHTML
-
String
Returns a save string
Parameters:
-
String
Objecthtml the text that should be removed from any html-entities
Returns:
String
blur
()
chainable
Blurs the Component.
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
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.
press
-
boolean
Callback-fn for the onClick-event.
Will invoke this.props.onChange
Parameters:
-
boolean
Object[directResponse] whether directly call onClick, or wait until the button raises up.
render
()
React render-method --> renderes the Component.
Returns:
ReactComponent
Properties
directResponse
Boolean
Whether the button resonses rapidly (keydown and mousedown). Note: native HTMLButtonElements don't resonse rapidly --> the onClick event happens on mouseUp.
Default: true
showActivated
Boolean
Whether keypress should show active status. (should be set false
for file-uploadbuttons)
Default: true
toggled
Boolean
Whether the button is in a toggle-state. You don;t need to use this directly: use the module ToggleButton instead.