Component Class
Description here
Copyright (c) 2016 ItsAsbreuk - http://itsasbreuk.nl
New BSD License - http://choosealicense.com/licenses/bsd-3-clause/
Item Index
Methods
componentDidMount
()
componentDidMount will set an eventlistener to the app:passwordresetrequest-event
defineMovementKeys
()
Extracts this.props.keyUp and this.props.keyDown into an array of objects
and defines them into this._keysUp and this._keysDown.
focusActiveElement
()
chainable
Sets the focus on the active Element of the Container.
focusElement
-
index
Sets the focus on the specified Element of the Container.
Parameters:
-
indexNumberthe index of the item to be focussed
render
()
React render-method --> renderes the Component.
Returns:
ReactComponent
Properties
focusOnContainerClick
Boolean
Whether a click on the container (outside its elements, should lead into focussing the container
Default: false
initialFocus
String | Number
A selector or index of the focussable items that should get the initial focus.
In case of a selector, it might return multiple nodes: the one that is being used
is determined by
initialFocusIndex
Number | "last"
In case initialFocus is a selector, it might return multiple nodes: the one that is being used.
In case of "last", it will return the last node.
Default: 0
keyDown
String | Number | Array
What key/keys are responsible for re-focussing down. Valid values are charcodes possible prepende with
a special key: 9 or shift+9 or ctrl+shift+9. Multiple key combinations can be defined bydefining an array of keyDown-values.
Default: 9
keyEnter
String | Number | Array
Whenever keyEnter is set, then the focus-container will become a nested- focuscontainer.
Nested focuscontainers will automaticcaly become focussable by their parent-container.
The keyEnter determines what key/keys are responsible for entering this container. Valid values are charcodes possible prepende with
a special key: 39 or shift+39 or ctrl+shift+39. Multiple key combinations can be defined bydefining an array of keyUp-values.
keyLeave
String | Number | Array
The keyLeave determines what key/keys are responsible for leaving this container and go to the parent focus-container.
Valid values are charcodes possible prepende with
a special key: 39 or shift+39 or ctrl+shift+39. Multiple key combinations can be defined bydefining an array of keyUp-values.
Default: 27
keyUp
String | Number | Array
What key/keys are responsible for re-focussing up. Valid values are charcodes possible prepended with
a special key: 9 or shift+9 or ctrl+shift+9. Multiple key combinations can be defined bydefining an array of keyUp-values.
Default: "shift+9"
onClick
Function
Callback whenever the focuscontainer gets clicked. The callback recieves 2 arguments: e {Object} --> eventobject nested {Boolean} --> whether the click happened inside a nested focus-container
refocusOnEnterInput
Boolean
Whether to focus on the next item whenever a enter is pressed on an input-element.
Default: true
scrollIntoView
String
Whether the focussed item should be scrolled into the view when the focusselector focuses it.
Default: true
transitionTime
Number
The transition-time when the window needs to be scrolled in order to get the focussable node into the view.