Skip to content

isDisabled Option Format not working. #9

@edargham

Description

@edargham

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions