Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-multi-style-dropdown-tree

deepaksardana153MIT0.0.4TypeScript support: included

React Multi Style Dropdown Tree

react, dropdown, tree, tree dropdown, select, react select dropdown, horizontal tree dropdown, vertical tree dropdown

readme

Inspire from react-select and react-tree-dropdown.

Creating react-multi-style-dropdown-tree which will give two types for hirerarchy Vertical as well as horizontal.

Demo:

Install

npm i react-multi-style-dropdown-tree

USAGE

import ReactTreeDropdown, {
  OPTION_STYLE
} from "react-multi-style-dropdown-tree";
import "react-multi-style-dropdown-tree/lib/index.css";
import { OPTIONS } from "./DummyData";

export default function App() {
  const [selectedValues, setSelectedValues] = useState([]);

  return (
    <div className="App">
      <ReactTreeDropdown
        value={selectedValues}
        dropdownOptions={OPTIONS}
        handleValueChange={(selectedData) => {
          setSelectedValues(selectedData);
        }}
        optionStyle={OPTION_STYLE.VERTICAL}
        placeholder="Select Options"
      />
    </div>
  );
}