diff --git a/examples/multiple.js b/examples/multiple.js
index 264810894..3287f6eaf 100644
--- a/examples/multiple.js
+++ b/examples/multiple.js
@@ -10,6 +10,8 @@ for (let i = 10; i < 36; i++) {
children.push();
}
+const maxValueCountSelect = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 26];
+
function onSelect() {
console.log(arguments);
}
@@ -22,6 +24,7 @@ const Test = React.createClass({
getInitialState() {
return {
useAnim: 0,
+ maxValueCount: 0,
value: [],
};
},
@@ -31,6 +34,11 @@ const Test = React.createClass({
value,
});
},
+ onMaxValueCountChange(e) {
+ this.setState({
+ maxValueCount: +e.target.value,
+ });
+ },
useAnim(e) {
this.setState({
useAnim: e.target.checked,
@@ -50,6 +58,14 @@ const Test = React.createClass({
anim
+
@@ -60,6 +76,7 @@ const Test = React.createClass({
dropdownMenuStyle={dropdownMenuStyle}
style={{ width: 500 }}
multiple
+ maxValueCount={this.state.maxValueCount}
optionFilterProp="children"
optionLabelProp="children"
onSelect={onSelect}
diff --git a/examples/tags.js b/examples/tags.js
index a041eb03f..da76aba25 100644
--- a/examples/tags.js
+++ b/examples/tags.js
@@ -9,11 +9,13 @@ const children = [];
for (let i = 10; i < 36; i++) {
children.push(
);
}
+const maxValueCountSelect = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 26];
const Test = React.createClass({
getInitialState() {
return {
disabled: false,
+ maxValueCount: 0,
value: ['name2', 'name3'],
};
},
@@ -23,6 +25,11 @@ const Test = React.createClass({
value,
});
},
+ onMaxValueCountChange(e) {
+ this.setState({
+ maxValueCount: +e.target.value,
+ });
+ },
toggleDisabled() {
this.setState({
disabled: !this.state.disabled,
@@ -33,6 +40,16 @@ const Test = React.createClass({
tags select(scroll the menu)
+
+
+