0.1.0 • Published 12 months ago

@talixo/combo-box v0.1.0

Weekly downloads
15
License
MIT
Repository
github
Last release
12 months ago

Talixo Combo box

UI Component which represents Combo box

How to install

Package is available as @talixo/combo-box in NPM registry, so you can use it in your project using npm install @talixo/combo-box --save or yarn add @talixo/combo-box.

Requirements

Your package should additionally have some extra dependencies:

  • @talixo/icon: ^0.1.1
  • @talixo/shared: ^0.1.0
  • downshift: ^1.31.11
  • prop-types: ^15.6.1
  • react: ^16.2.0
  • react-dom: ^16.2.0
  • react-input-autosize: ^2.2.1

These packages are required by @talixo/combo-box, but you have to install them manually, to avoid having different versions of these in your application.

Supported props

All of these components additionally allow some of Downshift props.

SelectBox

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to wrapper
optionsarrayn/aOptions to show
placeholdernoden/aPlaceholder to show when there is no value
multiboolfalseIs it multi-select?
valueanyself-controlledValue to show inside
iconnoden/aIcon shown next to select box
onChangefunctionn/aHandler for onChange event
onBlurfunctionn/aHandler for onBlur event
onFocusfunctionn/aHandler for onFocus event
renderItemfunctionitem => itemFunction to render item in menu list
renderValuefunctionuses renderItemFunction to render value in select box
buildItemIdfunctionitem indexFunction to build unique ID of item
itemToStringfunctionitem => itemFunction to convert item to string

ComboBox

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to wrapper
optionsarrayn/aOptions to show
placeholderstringn/aPlaceholder to show when there is no value
multiboolfalseIs it multi-select?
valueanyself-controlledValue to show inside
inputValuestringself-controlledValue to show in input
iconnoden/aIcon shown next to select box
onChangefunctionn/aHandler for onChange event
onInputValueChangefunctionn/aHandler fired when input value has changed
onNewValuefunctionn/aFunction fired when new value is requested in multi combo-box
onBlurfunctionn/aHandler for onBlur event
onFocusfunctionn/aHandler for onFocus event
renderItemfunctionitem => itemFunction to render item in menu list
renderValuefunctionuses renderItemFunction to render value (or tag) in select box
buildItemIdfunctionitem indexFunction to build unique ID of item
itemToStringfunctionitem => itemFunction to convert item to string

AutoComplete

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to wrapper
footernoden/aFooter for items list
optionsarrayn/aOptions to show
childrenstringself-controlledInput to show
onChoosefunctionn/aHandler fired when option is selected
onBlurfunctionn/aonBlur event passed from input
onFocusfunctionn/aonFocus event passed from input
onChangefunctionn/aonChange event passed from input
renderItemfunctionitem => itemFunction to render item in menu list
buildItemIdfunctionitem indexFunction to build unique ID of item
itemToStringfunctionitem => itemFunction to convert item to string

Changelog

  • 0.1.0 - initial version
1.0.0-alpha.38

12 months ago

1.0.0-alpha.37

12 months ago

1.0.0-alpha.36

12 months ago

1.0.0-alpha.35

5 years ago

1.0.0-alpha.31

6 years ago

1.0.0-alpha.30

6 years ago

1.0.0-alpha.27

6 years ago

1.0.0-alpha.24

6 years ago

1.0.0-alpha.21

6 years ago

1.0.0-alpha.20

6 years ago

1.0.0-alpha.19

6 years ago

1.0.0-alpha.18

6 years ago

1.0.0-alpha.16

6 years ago

1.0.0-alpha.12

6 years ago

1.0.0-alpha.7

6 years ago

1.0.0-alpha.6

6 years ago

1.0.0-alpha.5

6 years ago

1.0.0-alpha.4

6 years ago

1.0.0-alpha.3

6 years ago

1.0.0-alpha.2

6 years ago

0.1.0

6 years ago