1
  • I am using CheckboxTree library.

  • My component is rendering inside bootstrap modal.

    //My Component

import React from "react"; import CheckboxTree from "react-checkbox-tree";

const nodes = [
  {
    value: "mars",
    label: "Mars",
    children: [
      { value: "phobos", label: "Phobos" },
      { value: "deimos", label: "Deimos" },
    ],
  },
];

export default class ComplexSchemaTree extends React.Component {
  state = {
    checked: [],
    expanded: [],
  };

  render() {
    return (
      <CheckboxTree
        nodes={nodes}
        checked={this.state.checked}
        expanded={this.state.expanded}
        onCheck={(checked) => this.setState({ checked })}
        onExpand={(expanded) => this.setState({ expanded })}
      />
    );
  }
}

//Here is screenshot, enter image description here

ANKIT DHORELIYA
  • 95
  • 1
  • 1
  • 7

0 Answers0