Comments (2)
There are couple issues in the code you have written
class Forms extends Component {
constructor(props) {
super(props);
this.state = {
selected: [],
options: [
{ label: "USA đ´ó ľó łó Ąó łó ż", value: "USA" },
{ label: "India đ", value: "INDIA" },
{ label: "Japan đ", value: "Japan" }
]
};
}
// use arrow functions not normal ones because setState won't be available in normal ones
setSelected = (v) => {
this.setState({ selected: v });
}
render() {
return (
<MultiSelect
options={this.state.options}
value={this.state.selected}
// on given sample onChange event is wrong it should accept arguement and then setState for the received arguement
onChange={this.setSelected}
labelledBy={"Select"}
/>
);
}
}
from react-multi-select-component.
Thanks a lot for your quick help!
from react-multi-select-component.
Related Issues (20)
- is there any callback function for onClose dropdown? I want to call server request after selecting items. I don't want to call server request for each change HOT 1
- Option to add placeholder when no option is selected HOT 3
- Can we get array from mulselect component? HOT 1
- allow using strict CSP config HOT 1
- Reduce classname conflict potential by introducing BEM or something similar
- filterOptions always run while Dropdown is opening HOT 1
- Aria role not set on the dropdown.
- A ref option for more customisation
- Need a callback function that triggers when we search on dropdown
- Close the dropdown on button click
- "Name" property of the Component
- Validation form multiselect HOT 1
- Close the dropdown options after selecting an option in the rmsc
- language
- Unable to close the dropdown after double selection HOT 5
- MultiSelect width HOT 1
- Deselect "Select All" is not working HOT 1
- `defaultIsOpen` feature does not work when combined with `closeOnChangedValue`
- Show spinner when `filterOptions` fn is running.
- Add JSX.Element to use in label HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-multi-select-component.