-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I made sure to include the css files too, however the option in question is still selectable. here is the code to my switch:
import React, { Component } from 'react';
import MultiToggle from 'react-multi-toggle';
import "../../css/style.css";
const groupOptions = [
{
displayName: 'In queue',
value: 2
},
{
displayName: 'In progress',
value: 4
},
{
displayName: 'Evaluated',
value: 8
},
{
displayName: 'Completed',
value: 16,
isDisabled: true //this option should be rendered as disabled
}
];
/* as of here, the component is the same code as that of the example provided in the
documentation
*/
class Toggle extends Component {
constructor(props) {
super(props);
this.state = {
groupSize: 2
};
}
onGroupSizeSelect(value){
this.setState({ groupSize: value })
};
render(){
const { groupSize } = this.state;
return (
<MultiToggle
options={groupOptions}
selectedOption={groupSize}
onSelectOption={this.onGroupSizeSelect.bind(this)}
/>
);
}
}
export default Toggle;
N.B.: I forgot to mention I am also using bootstrap css on the page.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels