UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

19 lines (18 loc) 575 B
"use client"; //#region packages/@mantine/core/src/components/Cascader/get-cascader-path-options.ts function getCascaderPathOptions(data, value) { if (!value || value.length === 0) return []; const options = []; let level = data; for (const currentValue of value) { if (!level) break; const node = level.find((option) => option.value === currentValue); if (!node) break; options.push(node); level = node.children; } return options; } //#endregion exports.getCascaderPathOptions = getCascaderPathOptions; //# sourceMappingURL=get-cascader-path-options.cjs.map