score:0
is this what you are looking for??
<div className="col-md-2">
<label>Status</label>
<select className="selectpicker">
<option selected="selected">Choose one of the following</option>
<option>OK</option>
<option>PENDING</option>
<option>NEW</option>
</select>
</div>
score:3
Please check this: I have used the https://jedwatson.github.io/react-select/ and it works great.
import React from 'react';
import Select from 'react-select';
import 'react-select/dist/react-select.css';
export default class SelectComponent extends React.Component {
state = {
selectedOption: '',
}
handleChange = (selectedOption) => {
this.setState({ selectedOption });
console.log(`Selected: ${selectedOption.label}`);
}
render() {
const { selectedOption } = this.state;
return (
<Select
name="form-field-name"
value={selectedOption}
onChange={this.handleChange}
multi
options={[
{ value: 'one', label: 'One' },
{ value: 'two', label: 'Two' },
]}
/>
);
}
}
Source: stackoverflow.com
Related Query
- Bootstrap select element not rendered with react-router
- How to make Multi select without using bootstrap and with only pure css?
- React-Select, Multi Select and Text Overflow
- Clear multi select (react-select)
- React Select - Multi Select custom way to display multiple options
- Handling dropdown item select in React Bootstrap
- Render selected item outside of input box for multi select of react-select library
- Multi select from react-select with redux-form not working as intended
- How can I load multi select dynamically? [react-select]
- React hook form setValue returns undefined with multi select (react-select)
- material ui select not working when a list of data to be rendered
- React - MUI - cannot deselect all items in multi select
- How to have multi line options in a select Material UI
- React multi select hierarchy
- Unselect MUI Multi select with initial value
- Reorder multi select in react-select
- react-select.js Multi select preventDefault x button or remove
- Render multiple Select components depending on another multi value Select component
- React Multi Column Select Checkbox
- React - execute javascript after bootstrap modal is completely rendered and visible
- React multi carousel renders items wrongly
- React - Rendered item is not updating after initial render. When props change, should select different data
- How to set list of object as default values in material-UI multi select box in reactjs?
- React bootstrap table 2 programmatically select filter
- Bootstrap-select Multi-select rendered wrongly
- React Custom Multi Select Not working with external array
- React Bootstrap select option renders and does not display first available option when list renewed
- Antd Multi Select Clear Button
- multi select reactjs handlechange
- How to attach handler to React Bootstrap select component?
More Query from same tag
- how to fetch array with map from other js file in react?
- How to do conditional updates with Immutability-helper
- Input key loses focus on typing and does not show input value in react
- Programmatically change to another key in object
- NextJS Image Component with auth0
- How to use scss @use in React scss modules
- React: how to force state changes to take place after setState
- useParams and useEffect, Parameter via ${id} in the useEffect function
- forced line break after span coming from react, next or bootstrap?
- Async function: for-Loop object empty after await statement
- Can i set state in parent from child using useEffect hook in react
- How to make a generic toggle function using state?
- Nginx conflicts static files when serving multiple React apps
- Is setState() optional for updating the state in Alt.js store?
- How to convert recipe to calories per serving
- How to set Accordion opened all as default in Ant-design-mobile?
- How to get Chrome to respond to Windows 10 high contrast mode using javascript/typescript in a React app
- Unused div is appearing on react google maps and I can't style it
- TSX React - How to index JSON API Data with multiple JSON Objects
- How to format custom date,day in moment.js?
- setState react hook for array is not saving prior array elements
- How to "sort by" using a button for the data i am displaying out here
- Output Form Field Values in React
- Create HTML from for loop in JSX with React.js
- Error: Objects are not valid as a React child (found: [object Promise])
- React: trigger an event or value outside the root component
- Axios not showing informations on react page
- Page freezes when creating component from props
- Using emmet with a react app in vs code is not working
- Deploy an application with dockerised frontend and dockerise backend images