@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
13 lines (12 loc) • 660 B
JavaScript
"use client";
import { memoize } from "../../../core/utils/memoize/memoize.mjs";
import { getAllCheckedNodes } from "../get-all-checked-nodes/get-all-checked-nodes.mjs";
//#region packages/@mantine/core/src/components/Tree/is-node-indeterminate/is-node-indeterminate.ts
function isNodeIndeterminate(value, data, checkedState) {
if (checkedState.length === 0) return false;
return getAllCheckedNodes(data, checkedState).result.some((node) => node.value === value && node.indeterminate);
}
const memoizedIsNodeIndeterminate = memoize(isNodeIndeterminate);
//#endregion
export { memoizedIsNodeIndeterminate };
//# sourceMappingURL=is-node-indeterminate.mjs.map