@mui/x-tree-view
Version:
The community edition of the MUI X Tree View components.
25 lines • 1.02 kB
text/typescript
import type { TreeViewItemId } from "../../../models/index.mjs";
import type { RichTreeViewState } from "../../RichTreeViewStore/index.mjs";
export declare const lazyLoadingSelectors: {
/**
* Checks if the lazy loaded state is empty.
*/
isEmpty: (state: RichTreeViewState<any, any>) => boolean;
/**
* Checks whether an item is loading.
*/
isItemLoading: (state: RichTreeViewState<any, any>, itemId: TreeViewItemId | null) => boolean;
/**
* Gets the expected children count of an item currently loading its children.
* Returns `-1` when the count is unknown or the item is not loading.
*/
itemLoadingChildrenCount: (state: RichTreeViewState<any, any>, itemId: TreeViewItemId | null) => number;
/**
* Checks whether an item has errors.
*/
itemHasError: (state: RichTreeViewState<any, any>, itemId: TreeViewItemId | null) => boolean;
/**
* Get an item error.
*/
itemError: (state: RichTreeViewState<any, any>, itemId: TreeViewItemId | null) => Error | null | undefined;
};