Group Select

Group Select component to select value from options.

Install

import {GroupSelect} from '@xsolla/uikit'

Examples

Basic
Disabled XS
Show group with all elements
With many values

Usage

<GroupSelect
  name="basic"
  input={{ value: [], onChange: this.handleChange }}
  options={[
    {
      label: "Africa",
      value: "africa",
      children: [
        { label: "Algeria", value: "algeria" },
        { label: "Angola", value: "angola" },
        { label: "Benin", value: "benin" },
      ],
    },
  ]}
/>

API

PropertyDescriptionTypeDefault
inputconfig for redux-form or basic group-selectobject{}
namegroup-select namestringnull
metameta for redux-form or group-selectobject{touched: false, error: null}
optionsitems for group-selectarray
sizecan be set to xs, sm, mdstringmd
maxLengthmax output itemsnumber4
groupKeyinput & output key for groupstringgroup
childrenKeyinput & output key for childrenstringchildren
placeholderset the placeholder of inputstringnull
disabledset the disabled of inputbooleanfalse
containerClassNameclassName for popover elementstring''
initialGroupinitial active groupstring &#124; numberoptions[0].value
showAllGroupset showing group with all elementsbooleanfalse
allGroupLabeltext for group with all elementsstring'All'