react-cascading-menu
Version:
A powerful React cascading dropdown component with multi-selection, search functionality, and hierarchical navigation. Perfect for building category selectors, dependent dropdowns, and nested menu systems with TypeScript support.
20 lines (19 loc) • 658 B
TypeScript
import React, { ReactNode } from "react";
import { ItemId, MenuGroupMap, SelectedItemType } from "../types";
interface CompleteObj {
label: string;
indexes: number[];
}
interface Props {
leafNodes: ItemId[][];
menuGroupMap: MenuGroupMap;
handleTagRemoval: (selectionPath: ItemId[]) => void;
handleSelectionPopulation: (selectionPath: ItemId[]) => void;
layout?: "horizontal" | "vertical";
allItems: CompleteObj[];
handleBulkAddition: (items: SelectedItemType, leafId: ItemId) => void;
children: ReactNode;
mainParentId: ItemId;
}
declare const CascadingDropdown: React.FC<Props>;
export default CascadingDropdown;