arengibook 2.4.583 → 2.4.584
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +22 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35819,7 +35819,10 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
35819
35819
|
_ref$errorMessage = _ref.errorMessage,
|
|
35820
35820
|
errorMessage = _ref$errorMessage === void 0 ? '' : _ref$errorMessage,
|
|
35821
35821
|
_ref$valueStyle = _ref.valueStyle,
|
|
35822
|
-
valueStyle = _ref$valueStyle === void 0 ? {
|
|
35822
|
+
valueStyle = _ref$valueStyle === void 0 ? {
|
|
35823
|
+
paddingTop: '1rem',
|
|
35824
|
+
paddingBottom: '1rem'
|
|
35825
|
+
} : _ref$valueStyle,
|
|
35823
35826
|
_ref$optionStyle = _ref.optionStyle,
|
|
35824
35827
|
optionStyle = _ref$optionStyle === void 0 ? {} : _ref$optionStyle,
|
|
35825
35828
|
name = _ref.name,
|
|
@@ -35843,6 +35846,22 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
35843
35846
|
useEffect(function () {
|
|
35844
35847
|
setOptionSelected(value !== null && value !== void 0 ? value : null);
|
|
35845
35848
|
}, [value]);
|
|
35849
|
+
useEffect(function () {
|
|
35850
|
+
var handleScroll = function handleScroll() {
|
|
35851
|
+
var dropdownPanels = document.querySelectorAll('.p-dropdown-panel');
|
|
35852
|
+
dropdownPanels.forEach(function (panel) {
|
|
35853
|
+
if (panel && panel.style.display !== 'none') {
|
|
35854
|
+
// Simule un clic en dehors ou cache manuellement
|
|
35855
|
+
document.body.click();
|
|
35856
|
+
document.activeElement.blur();
|
|
35857
|
+
}
|
|
35858
|
+
});
|
|
35859
|
+
};
|
|
35860
|
+
window.addEventListener('scroll', handleScroll, true);
|
|
35861
|
+
return function () {
|
|
35862
|
+
window.removeEventListener('scroll', handleScroll, true);
|
|
35863
|
+
};
|
|
35864
|
+
}, []);
|
|
35846
35865
|
var resetDropdownFilter = function resetDropdownFilter() {
|
|
35847
35866
|
setTimeout(function () {
|
|
35848
35867
|
var dropdownPanels = document.querySelectorAll('.p-dropdown-panel');
|
|
@@ -35901,13 +35920,13 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
35901
35920
|
fontSize: '15px',
|
|
35902
35921
|
fontWeight: 'bold'
|
|
35903
35922
|
}, labelStyle)
|
|
35904
|
-
}, generalIcon && /*#__PURE__*/React__default.createElement(
|
|
35923
|
+
}, generalIcon && /*#__PURE__*/React__default.createElement("i", {
|
|
35905
35924
|
style: _objectSpread2({
|
|
35906
35925
|
fontSize: '15px',
|
|
35907
35926
|
fontWeight: 'bold'
|
|
35908
35927
|
}, labelStyle),
|
|
35909
35928
|
className: generalIcon
|
|
35910
|
-
})
|
|
35929
|
+
}), generalImage && /*#__PURE__*/React__default.createElement("img", {
|
|
35911
35930
|
alt: "General",
|
|
35912
35931
|
src: generalImage,
|
|
35913
35932
|
style: imageStyle || {
|