Giter Site home page Giter Site logo

uxcore-select2's Introduction


uxcore-select2 Dependency Status devDependency Status

TL;DR

uxcore-select2 ui component for react

setup develop environment

$ git clone https://github.com/uxcore/uxcore-select2
$ cd uxcore-select2
$ npm install
$ gulp server

Usage

var Select = require('uxcore-select2');
<Select>
  <Option value="lucy">lucy</Option>
</Select>

demo

http://uxcore.github.io/select/

Props

Select props

参数 说明 类型 默认值
value 指定当前选中的条目 string/Array
defaultValue 指定默认选中的条目 string/Array
multiple 支持多选 false
filterOption 是否根据输入项进行筛选 true
tags 可以把随意输入的条目作为tag,输入项不需要与下拉选项匹配 false
onSelect 被选中时调用,参数为选中的option value值 function
onDeselect 取消选中时调用,参数为选中的option value值,仅在multiple或tags模式下生效 function
onChange 选中option,或input的value变化(combobox模式下)时,调用此函数 function
allowClear 显示清除按钮 false
placeholder 选择框默认文字 string
searchPlaceholder 搜索框默认文字 string
optionFilterProp 输入项过滤对应的 option 属性 string value
combobox 输入框自动提示模式 false
size 选择框大小 String
optionLabelProp 选择 Option 的哪个 prop 作为选择框中的显示。 string 'children'
getPopupContainer 弹出的菜单渲染在哪个容器中 function(trigger:Node):Node function(){return document.body;}
dropdownMatchSelectWidth dropdown 部分是否和 select 部分同宽 boolean true
dropdownClassName dropdown 部分的定制类名 string -
notFoundContent 未找到选项时的提示文案 string not found

Option props

参数 说明 类型 默认值
disabled 是否禁用 Boolean false
key 如果react需要你设置此项,此项值与value的值相同,然后可以省略value设置 String
value 默认根据此属性值进行筛选 String -

OptGroup props

参数 说明 类型 默认值
label 组名 String/React.Element
key String -

uxcore-select2's People

Contributors

macisi avatar gbk avatar

Watchers

James Cloos avatar Zhou Yong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.