rc-cascader
Advanced tools
Comparing version 3.10.2 to 3.10.3
@@ -19,3 +19,4 @@ import * as React from 'react'; | ||
isSelectable: (option: DefaultOptionType) => boolean; | ||
searchValue?: string; | ||
} | ||
export default function Column({ prefixCls, multiple, options, activeValue, prevValuePath, onToggleOpen, onSelect, onActive, checkedSet, halfCheckedSet, loadingKeys, isSelectable, }: ColumnProps): JSX.Element; | ||
export default function Column({ prefixCls, multiple, options, activeValue, prevValuePath, onToggleOpen, onSelect, onActive, checkedSet, halfCheckedSet, loadingKeys, isSelectable, searchValue, }: ColumnProps): JSX.Element; |
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
import classNames from 'classnames'; | ||
import * as React from 'react'; | ||
import classNames from 'classnames'; | ||
import CascaderContext from "../context"; | ||
import { SEARCH_MARK } from "../hooks/useSearchOptions"; | ||
import { isLeaf, toPathKey } from "../utils/commonUtil"; | ||
import CascaderContext from "../context"; | ||
import Checkbox from "./Checkbox"; | ||
import { SEARCH_MARK } from "../hooks/useSearchOptions"; | ||
export var FIX_LABEL = '__cascader_fix_label__'; | ||
@@ -22,3 +22,4 @@ export default function Column(_ref) { | ||
loadingKeys = _ref.loadingKeys, | ||
isSelectable = _ref.isSelectable; | ||
isSelectable = _ref.isSelectable, | ||
searchValue = _ref.searchValue; | ||
var menuPrefixCls = "".concat(prefixCls, "-menu"); | ||
@@ -90,9 +91,10 @@ var menuItemPrefixCls = "".concat(prefixCls, "-menu-item"); | ||
var triggerOpenPath = function triggerOpenPath() { | ||
if (!disabled) { | ||
var nextValueCells = _toConsumableArray(fullPath); | ||
if (hoverOpen && isMergedLeaf) { | ||
nextValueCells.pop(); | ||
} | ||
onActive(nextValueCells); | ||
if (disabled || searchValue) { | ||
return; | ||
} | ||
var nextValueCells = _toConsumableArray(fullPath); | ||
if (hoverOpen && isMergedLeaf) { | ||
nextValueCells.pop(); | ||
} | ||
onActive(nextValueCells); | ||
}; | ||
@@ -99,0 +101,0 @@ |
@@ -205,2 +205,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
}, columnProps, { | ||
searchValue: searchValue, | ||
prefixCls: mergedPrefixCls, | ||
@@ -207,0 +208,0 @@ options: col.options, |
@@ -19,3 +19,4 @@ import * as React from 'react'; | ||
isSelectable: (option: DefaultOptionType) => boolean; | ||
searchValue?: string; | ||
} | ||
export default function Column({ prefixCls, multiple, options, activeValue, prevValuePath, onToggleOpen, onSelect, onActive, checkedSet, halfCheckedSet, loadingKeys, isSelectable, }: ColumnProps): JSX.Element; | ||
export default function Column({ prefixCls, multiple, options, activeValue, prevValuePath, onToggleOpen, onSelect, onActive, checkedSet, halfCheckedSet, loadingKeys, isSelectable, searchValue, }: ColumnProps): JSX.Element; |
@@ -12,8 +12,8 @@ "use strict"; | ||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _context = _interopRequireDefault(require("../context")); | ||
var _useSearchOptions = require("../hooks/useSearchOptions"); | ||
var _commonUtil = require("../utils/commonUtil"); | ||
var _context = _interopRequireDefault(require("../context")); | ||
var _Checkbox = _interopRequireDefault(require("./Checkbox")); | ||
var _useSearchOptions = require("../hooks/useSearchOptions"); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -35,3 +35,4 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
loadingKeys = _ref.loadingKeys, | ||
isSelectable = _ref.isSelectable; | ||
isSelectable = _ref.isSelectable, | ||
searchValue = _ref.searchValue; | ||
var menuPrefixCls = "".concat(prefixCls, "-menu"); | ||
@@ -103,9 +104,10 @@ var menuItemPrefixCls = "".concat(prefixCls, "-menu-item"); | ||
var triggerOpenPath = function triggerOpenPath() { | ||
if (!disabled) { | ||
var nextValueCells = (0, _toConsumableArray2.default)(fullPath); | ||
if (hoverOpen && isMergedLeaf) { | ||
nextValueCells.pop(); | ||
} | ||
onActive(nextValueCells); | ||
if (disabled || searchValue) { | ||
return; | ||
} | ||
var nextValueCells = (0, _toConsumableArray2.default)(fullPath); | ||
if (hoverOpen && isMergedLeaf) { | ||
nextValueCells.pop(); | ||
} | ||
onActive(nextValueCells); | ||
}; | ||
@@ -112,0 +114,0 @@ |
@@ -216,2 +216,3 @@ "use strict"; | ||
}, columnProps, { | ||
searchValue: searchValue, | ||
prefixCls: mergedPrefixCls, | ||
@@ -218,0 +219,0 @@ options: col.options, |
{ | ||
"name": "rc-cascader", | ||
"version": "3.10.2", | ||
"version": "3.10.3", | ||
"description": "cascade select ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164648
3106