@mui/x-tree-view
Version:
The community edition of the MUI X Tree View components.
48 lines • 2 kB
TypeScript
import { MinimalTreeViewState } from "../../MinimalTreeViewStore/index.js";
export declare const selectionSelectors: {
/**
* Gets the selected items as provided to the component.
*/
selectedItemsRaw: (state: MinimalTreeViewState<any, any>) => string | readonly string[] | readonly string[] | null;
/**
* Gets the selected items as an array.
*/
selectedItems: (args_0: MinimalTreeViewState<any, any>) => any[];
/**
* Gets the selected items as a Map.
*/
selectedItemsMap: (args_0: MinimalTreeViewState<any, any>) => Map<string, true>;
/**
* Checks whether selection is enabled.
*/
enabled: (state: MinimalTreeViewState<any, any>) => boolean;
/**
* Checks whether multi selection is enabled.
*/
isMultiSelectEnabled: (state: MinimalTreeViewState<any, any>) => boolean;
/**
* Checks whether checkbox selection is enabled.
*/
isCheckboxSelectionEnabled: (state: MinimalTreeViewState<any, any>) => boolean;
/**
* Gets the selection propagation rules.
*/
propagationRules: (state: MinimalTreeViewState<any, any>) => import("../../../index.js").TreeViewSelectionPropagation;
/**
* Checks whether an item is selected.
*/
isItemSelected: (args_0: MinimalTreeViewState<any, any>, itemId: string) => boolean;
/**
* Checks whether the selection feature is enabled for an item.
* Returns `true` when selection is enabled on the Tree View and the item is selectable (even if the item is disabled).
*/
isFeatureEnabledForItem: (args_0: MinimalTreeViewState<any, any>, _itemId: string) => boolean;
/**
* Checks whether an item can be selected (if selection is enabled, if the item is not disabled, and if the item is selectable).
*/
canItemBeSelected: (args_0: MinimalTreeViewState<any, any>, _itemId: string) => boolean;
/**
* Checks whether an item is selectable based on the `isItemSelectionDisabled` prop.
*/
isItemSelectable: (state: MinimalTreeViewState<any, any>, itemId: string) => boolean;
};