react-bootstrap-select-dropdown
Advanced tools
Comparing version 1.3.4 to 1.3.5
@@ -71,7 +71,7 @@ "use strict"; | ||
(0, _react.useEffect)(function () { | ||
if (defaultOptions.length) { | ||
options.forEach(function (optItem) { | ||
optItem.isSelected = defaultOptions.indexOf(optItem.labelKey) !== -1 ? true : false; | ||
}); | ||
}, [defaultOptions]); | ||
} | ||
@@ -137,3 +137,13 @@ var selectEl = _react["default"].useRef(); | ||
setOptionsList(options); | ||
}, [options]); // Hide menu items | ||
}, [options]); | ||
(0, _react.useEffect)(function () { | ||
if (defaultOptions.length) { | ||
options.forEach(function (optItem) { | ||
optItem.isSelected = defaultOptions.indexOf(optItem.labelKey) !== -1 ? true : false; | ||
}); | ||
} else { | ||
setSelectedValue([]); | ||
setSelectedKey([]); | ||
} | ||
}, [defaultOptions]); // Hide menu items | ||
@@ -140,0 +150,0 @@ var hideMenu = function hideMenu() { |
@@ -0,1 +1,5 @@ | ||
# v1.3.5 | ||
- Bug fixes: Update selected option to none if required to set as blank using set "defaultOptions" to []. | ||
# v1.3.4 | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "react-bootstrap-select-dropdown", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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
41120
406