@uiw/react-search-tree
Advanced tools
Comparing version 4.13.4 to 4.13.5
@@ -184,3 +184,3 @@ "use strict"; | ||
(0, _react.useEffect)(function () { | ||
selectedValuesSet(value); | ||
selectedValuesSet(Array.isArray(value) ? value : []); | ||
}, [JSON.stringify(value)]); | ||
@@ -207,9 +207,10 @@ | ||
var hiddenNodeForSeach = function hiddenNodeForSeach(childrens) { | ||
var parentIsHide = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; | ||
childrens.forEach(function (child) { | ||
var _child$children2; | ||
var isHide = !child.label.includes(searchValue); | ||
var isHide = !child.label.includes(searchValue.trim()) && parentIsHide; | ||
if (!!((_child$children2 = child.children) !== null && _child$children2 !== void 0 && _child$children2.length)) { | ||
hiddenNodeForSeach(child.children); | ||
hiddenNodeForSeach(child.children, isHide); | ||
var find = child.children.find(function (item) { | ||
@@ -220,3 +221,2 @@ return !item.hideNode; | ||
} else { | ||
// const isHide = !(child.label as string).includes(searchValue) | ||
child.hideNode = isHide; | ||
@@ -238,3 +238,3 @@ } | ||
emptyOption: isEmpty, | ||
onSearch: debounce(selectedSearch, 700), | ||
onSearch: debounce(selectedSearch, 600), | ||
onChange: selectedChange, | ||
@@ -241,0 +241,0 @@ values: selectedValues, |
@@ -149,3 +149,3 @@ "use strict"; | ||
return /*#__PURE__*/_react["default"].cloneElement(content, newProps); | ||
}, [selectedOption, options, emptyOption]); | ||
}, [JSON.parse(JSON.stringify(selectedOption)), options, emptyOption]); | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactDropdown["default"], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({ | ||
@@ -152,0 +152,0 @@ className: cls, |
@@ -129,3 +129,3 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
useEffect(() => { | ||
selectedValuesSet(value); | ||
selectedValuesSet(Array.isArray(value) ? value : []); | ||
}, [JSON.stringify(value)]); | ||
@@ -151,14 +151,17 @@ | ||
var selectedSearch = searchValue => { | ||
var hiddenNodeForSeach = childrens => { | ||
var hiddenNodeForSeach = function hiddenNodeForSeach(childrens, parentIsHide) { | ||
if (parentIsHide === void 0) { | ||
parentIsHide = true; | ||
} | ||
childrens.forEach(child => { | ||
var _child$children2; | ||
var isHide = !child.label.includes(searchValue); | ||
var isHide = !child.label.includes(searchValue.trim()) && parentIsHide; | ||
if (!!((_child$children2 = child.children) != null && _child$children2.length)) { | ||
hiddenNodeForSeach(child.children); | ||
hiddenNodeForSeach(child.children, isHide); | ||
var find = child.children.find(item => !item.hideNode); | ||
child.hideNode = isHide && !find; | ||
} else { | ||
// const isHide = !(child.label as string).includes(searchValue) | ||
child.hideNode = isHide; | ||
@@ -178,3 +181,3 @@ } | ||
emptyOption: isEmpty, | ||
onSearch: debounce(selectedSearch, 700), | ||
onSearch: debounce(selectedSearch, 600), | ||
onChange: selectedChange, | ||
@@ -181,0 +184,0 @@ values: selectedValues, |
@@ -107,3 +107,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
return /*#__PURE__*/React.cloneElement(content, newProps); | ||
}, [selectedOption, options, emptyOption]); | ||
}, [JSON.parse(JSON.stringify(selectedOption)), options, emptyOption]); | ||
return /*#__PURE__*/_jsx(Dropdown, _extends({ | ||
@@ -110,0 +110,0 @@ className: cls, |
{ | ||
"name": "@uiw/react-search-tree", | ||
"version": "4.13.4", | ||
"version": "4.13.5", | ||
"description": "TreeChecked component", | ||
@@ -46,12 +46,12 @@ "homepage": "https://uiwjs.github.io/#/components/search-tree", | ||
"dependencies": { | ||
"@uiw/react-card": "^4.13.4", | ||
"@uiw/react-checkbox": "^4.13.4", | ||
"@uiw/react-dropdown": "^4.13.4", | ||
"@uiw/react-empty": "^4.13.4", | ||
"@uiw/react-icon": "^4.13.4", | ||
"@uiw/react-input": "^4.13.4", | ||
"@uiw/react-tag": "^4.13.4", | ||
"@uiw/react-tree": "^4.13.4", | ||
"@uiw/react-tree-checked": "^4.13.4", | ||
"@uiw/utils": "^4.13.4" | ||
"@uiw/react-card": "^4.13.5", | ||
"@uiw/react-checkbox": "^4.13.5", | ||
"@uiw/react-dropdown": "^4.13.5", | ||
"@uiw/react-empty": "^4.13.5", | ||
"@uiw/react-icon": "^4.13.5", | ||
"@uiw/react-input": "^4.13.5", | ||
"@uiw/react-tag": "^4.13.5", | ||
"@uiw/react-tree": "^4.13.5", | ||
"@uiw/react-tree-checked": "^4.13.5", | ||
"@uiw/utils": "^4.13.5" | ||
}, | ||
@@ -58,0 +58,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
114221
1230
Updated@uiw/react-card@^4.13.5
Updated@uiw/react-checkbox@^4.13.5
Updated@uiw/react-dropdown@^4.13.5
Updated@uiw/react-empty@^4.13.5
Updated@uiw/react-icon@^4.13.5
Updated@uiw/react-input@^4.13.5
Updated@uiw/react-tag@^4.13.5
Updated@uiw/react-tree@^4.13.5
Updated@uiw/utils@^4.13.5