New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uxcore-select2

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uxcore-select2 - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

4

demo/index.js
/**
* Select2 Component Demo for uxcore
* @author
* @author
*

@@ -10,2 +10,2 @@ * Copyright 2014-2015, Uxcore Team, Alinw.

var Demo = require('./Select2Demo');
React.render(<Demo/>, document.getElementById('UXCoreDemo'));
ReactDOM.render(<Demo/>, document.getElementById('UXCoreDemo'));

@@ -33,2 +33,3 @@ let Select = require('../src');

options: [],
ajaxData: [],
cities: cityData[provinceData[0]],

@@ -39,2 +40,24 @@ secondCity:cityData[provinceData[0]][0]

fetchData(value) {
let me = this;
$.ajax({
url: "http://suggest.taobao.com/sug",
dataType: "jsonp",
data: {q: value},
success: (data) => {
me.setState({
ajaxData: data.result
});
},
fail: () => {
console.log("Fetch Data failed");
}
})
}
handleSearch(value) {
let me = this;
me.fetchData(value);
}
handleMailChange(value) {

@@ -67,2 +90,3 @@ var options;

render() {
let me = this;
let provinceOptions = provinceData.map(function(province) {

@@ -74,2 +98,5 @@ return <Option key={province}>{province}</Option>;

});
let ajaxOptions = me.state.ajaxData.map((d,index) => {
return <Option key={d[1]}>{d[0]}</Option>;
});
return (

@@ -95,2 +122,6 @@ <div>

</Select>
<p>多选提示,提示项根据 ajax 获得</p>
<Select multiple filterOption={false} style={{width: 400}} onSearch={me.handleSearch.bind(me)} onChange={handleChange}>
{ajaxOptions}
</Select>
<p>标签:(标签的意义是,用户可以通过键盘自己输入值,而不局限于传入的选项)</p>

@@ -97,0 +128,0 @@ <Select style={{width: '100%'}} searchPlaceholder="标签模式" tags onChange={handleChange}>

@@ -5,4 +5,7 @@ # History

## 0.1.6
`CHANGED` upgrade to react@0.14
## 0.1.5
`CHANGED` update rc-select to 4.9.0
`CHANGED` update rc-select to 4.9.0

@@ -9,0 +12,0 @@ ## 0.1.4

{
"name": "uxcore-select2",
"version": "0.1.5",
"version": "0.1.6",
"description": "select ui component for react",

@@ -35,3 +35,6 @@ "main": "src/index.js",

"gulp-sourcemaps": "~1.5.2",
"jquery": "~1.11.3",
"jsonp": "^0.2.0",
"react": "~0.14.0",
"react-dom": "~0.14.0",
"webpack": "^1.10.5"

@@ -43,4 +46,3 @@ },

"rc-select": "~4.9.0",
"react": "^0.13.3",
"uxcore-kuma": "~1.0.6"
"uxcore-kuma": "^1.1.0"
},

@@ -47,0 +49,0 @@ "author": "",

@@ -1,35 +0,21 @@

# uxcore-select
---
- tags: uxcore, select
- description: uxcore select
- maintainers: vincent.bian
- version: 0.1.4
- lastupdate: 2015/9/1
- screenshots:
## uxcore-select2 [![Dependency Status](http://img.shields.io/david/uxcore/uxcore-select2.svg?style=flat-square)](https://david-dm.org/uxcore/uxcore-select2) [![devDependency Status](http://img.shields.io/david/dev/uxcore/uxcore-select2.svg?style=flat-square)](https://david-dm.org/uxcore/uxcore-select2#info=devDependencies)
---
## TL;DR
uxcore-select2 ui component for react
#### setup develop environment
```sh
$ git clone https://github.com/uxcore/select
$ cd select
$ git clone https://github.com/uxcore/uxcore-select2
$ cd uxcore-select2
$ npm install
$ npm run dev
$ gulp server
```
nav http://localhost:9090/webpack-dev-server/example/ to see the demo
#### deploy to gh-pages
[refer to]( http://stackoverflow.com/questions/17643381/how-to-upload-my-angularjs-static-site-to-github-pages)
```sh
$ npm run build
$ git add build & git commit -m 'update deploy files'
$ npm run deploy
```
## Usage
```js
```javascript
var Select = require('uxcore-select2');

@@ -44,3 +30,3 @@ <Select>

## API
## Props

@@ -65,2 +51,3 @@ ### Select props

|size | 选择框大小 | String | 无 |
|optionLabelProp| 选择 Option 的哪个 prop 作为选择框中的显示。| string | 'children' |

@@ -67,0 +54,0 @@ ### Option props

let RcSelect = require('rc-select');
let assign = require('object-assign');

@@ -9,4 +10,6 @@ class Select2 extends RcSelect {

Select2.displayName = 'Select2';
Select2.defaultProps = RcSelect.defaultProps;
Select2.defaultProps.prefixCls = "kuma-select";
Select2.defaultProps = assign({}, RcSelect.defaultProps, {
prefixCls: "kuma-select",
optionLabelProp: "children"
});

@@ -13,0 +16,0 @@ module.exports = Select2;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc