react-multi-style-dropdown-tree
v0.0.4
Published
React Multi Style Dropdown Tree
Downloads
212
Maintainers
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>
);
}