API Docs for: 0.0.1
Show:

Select Class

Nice select for react.

Copyright (c) 2016 ItsAsbreuk - http://itsasbreuk.nl
New BSD License - http://choosealicense.com/licenses/bsd-3-clause/

Methods

_defaultItemRenderer

(
  • String|Object
)
private

Defined in lib/component.jsx:413

Available since 0.0.1

Returns a html that represent the item as how it should be rendered.

Parameters:

  • String|Object Object

    list-item

Returns:

String html that represent the item

_getUlContainerNode

() private

Defined in lib/component.jsx:426

Available since 0.0.1

Returns the ul-element that contains all li-elements.

Returns:

Element

_handleDocumentClick

(
  • Object
)
private

Defined in lib/component.jsx:440

Available since 0.0.1

Callback for a click on the document. Is needed to close the Component when clicked outside.

Parameters:

_saveHTML

(
  • String
)
private

Defined in lib/component.jsx:458

Available since 0.0.1

Returns a save string

Parameters:

  • String Object

    html the text that should be removed from any html-entities

Returns:

String

componentDidMount

()

Defined in lib/component.jsx:63

Available since 0.0.1

componentDidMount does some initialization.

componentWillUnmount

()

Defined in lib/component.jsx:84

Available since 0.0.1

componentWilUnmount does some cleanup.

focus

(
  • [transitionTime]
)
chainable

Defined in lib/component.jsx:102

Available since 0.0.1

Sets the focus on the Component.

Parameters:

  • [transitionTime] Number optional

    transition-time to focus the element into the view

handleClick

()

Defined in lib/component.jsx:125

Available since 0.0.1

Callback-fn for the onClick-event. Will invoke this.props.onChange

handleContainerFocus

(
  • e
)

Defined in lib/component.jsx:114

Available since 0.1.0

Callback that sets the focus to the descendent element by calling focus()

Parameters:

handleItemClick

()

Defined in lib/component.jsx:155

Available since 0.0.1

Callback-fn when an item is clicked

handleItemScroll

()

Defined in lib/component.jsx:201

Available since 0.0.1

Callback-fn when an item is scrolled by keys

handleKeyDown

()

Defined in lib/component.jsx:216

Available since 0.0.1

Callback-fn for the onKeyDown-event.

handleKeyUp

()

Defined in lib/component.jsx:244

Available since 0.0.1

Callback-fn for the onKeyUp-event.

handleMouseDown

()

Defined in lib/component.jsx:254

Available since 0.0.1

Callback-fn for the onMouseDown-event.

handleMouseUp

()

Defined in lib/component.jsx:267

Available since 0.0.1

Callback-fn for the onMouseUp-event.

render

()

Defined in lib/component.jsx:282

Available since 0.0.1

React render-method --> renderes the Component.

Returns:

ReactComponent

Properties

autoFocus

Boolean

Defined in lib/component.jsx:473

Available since 0.0.1

Whether to autofocus the Component.

btnClassName

String

Defined in lib/component.jsx:482

Available since 0.0.1

ClassName that should be set to the select-button

btnRenderer

Function

Defined in lib/component.jsx:491

Available since 0.0.1

A render-function for the buttonText. When not supplied (default), The selected item will be rendered as the buttonText.

className

String

Defined in lib/component.jsx:501

Available since 0.0.1

ClassName that should be set to the Element

closeOnClick

Boolean

Defined in lib/component.jsx:510

Available since 15.3.32

Whether the dropdown-list should be collapsed when an item is clicked.

Default: true

disabled

Boolean

Defined in lib/component.jsx:520

Available since 0.0.1

Whether the component is disabled

emptyHTML

String

Defined in lib/component.jsx:529

Available since 0.0.1

The HTML that the select should show when no item is selected. Defaults "Choose..."

errorMsg

String

Defined in lib/component.jsx:539

Available since 0.0.1

The errormessage to show when the Select is not validated.

formValidated

Boolean

Defined in lib/component.jsx:548

Available since 0.0.1

Whether the parent-form has been validated. This value is needed to determine if the validate-status should be set.

items

Array

Defined in lib/component.jsx:558

Available since 0.0.1

List with all the items, either as Strings or Objects.

listHeight

Number

Defined in lib/component.jsx:567

Available since 0.0.1

The height of the select-list. If not set, then all items are shown without a scroller.

loop

Boolean

Defined in lib/component.jsx:576

Available since 15.0.0

Whether the loop the items when the last/first item is reached.

Default: false

markValidated

Boolean

Defined in lib/component.jsx:586

Available since 0.0.1

Whether the Component should show an validate-reclamation (star) when it requires a selected item yet when there is no item selected.

multiSelect

Boolean

Defined in lib/component.jsx:596

Available since 15.3.32

Whether the dropdown-list accepts multiple selected items.

Default: false

onChange

Function

Defined in lib/component.jsx:606

Available since 0.0.1

The onChange function, which should update the state.

readOnly

Boolean

Defined in lib/component.jsx:615

Available since 15.2.0

Whether the checkbox is readonly

Default: false

readOnly

Number

Defined in lib/component.jsx:634

Available since 15.2.0

The index that is selected

Default: null

required

Boolean

Defined in lib/component.jsx:625

Available since 0.0.1

Whether to Component requires a valid selection

style

Object

Defined in lib/component.jsx:644

Available since 0.0.1

Inline style

type

Number

Defined in lib/component.jsx:653

Available since 0.1.2

The tabindex of the Component.