x-ui-design 0.2.100 → 0.3.0
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.esm.js +6 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/lib/components/Select/Select.tsx +6 -6
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3034,15 +3034,15 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
|
|
|
3034
3034
|
const spaceBelow = windowHeight - selectBox.bottom;
|
|
3035
3035
|
const spaceAbove = selectBox.top;
|
|
3036
3036
|
let positionStyle = {
|
|
3037
|
-
top: `${selectBox.bottom + window.scrollY
|
|
3038
|
-
left: `${selectBox.left + window.scrollX
|
|
3037
|
+
top: `${selectBox.bottom + window.scrollY}px`,
|
|
3038
|
+
left: `${selectBox.left + window.scrollX}px`,
|
|
3039
3039
|
width: `${selectBox.width}px`,
|
|
3040
3040
|
position: 'absolute'
|
|
3041
3041
|
};
|
|
3042
3042
|
if (spaceBelow < dropdownHeight && spaceAbove > dropdownHeight) {
|
|
3043
3043
|
positionStyle = {
|
|
3044
|
-
top: `${selectBox.top + window.scrollY - dropdownHeight
|
|
3045
|
-
left: `${selectBox.left + window.scrollX
|
|
3044
|
+
top: `${selectBox.top + window.scrollY - dropdownHeight}px`,
|
|
3045
|
+
left: `${selectBox.left + window.scrollX}px`,
|
|
3046
3046
|
width: `${selectBox.width}px`,
|
|
3047
3047
|
position: 'absolute'
|
|
3048
3048
|
};
|
|
@@ -3178,10 +3178,10 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
|
|
|
3178
3178
|
isOpen: isOpen
|
|
3179
3179
|
}));
|
|
3180
3180
|
}, [showArrow, showSearch, isOpen, suffixIcon]);
|
|
3181
|
-
const popupContainer = (() => {
|
|
3181
|
+
const popupContainer = useMemo(() => {
|
|
3182
3182
|
if (typeof window === 'undefined') return null;
|
|
3183
3183
|
return selectRef.current ? getPopupContainer?.(selectRef.current) : document.body;
|
|
3184
|
-
})
|
|
3184
|
+
}, [getPopupContainer, selectRef.current]);
|
|
3185
3185
|
const extractedOptions = children ? (Array.isArray(children) ? children : [children]).filter(e => e).map(child => child.props) : options;
|
|
3186
3186
|
const filteredOptions = extractedOptions.filter(option => {
|
|
3187
3187
|
if (typeof filterOption === 'function') {
|