funda-ui 4.7.560 → 4.7.565
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/Date/index.js +1 -2
- package/Input/index.js +1 -1
- package/LiveSearch/index.js +5 -4
- package/RangeSlider/index.js +1 -1
- package/Select/index.js +7 -33
- package/lib/cjs/Date/index.js +1 -2
- package/lib/cjs/Input/index.js +1 -1
- package/lib/cjs/LiveSearch/index.js +5 -4
- package/lib/cjs/RangeSlider/index.js +1 -1
- package/lib/cjs/Select/index.js +7 -33
- package/lib/esm/Date/index.tsx +0 -1
- package/lib/esm/Input/index.tsx +1 -1
- package/lib/esm/LiveSearch/index.tsx +5 -4
- package/lib/esm/Select/index.tsx +7 -36
- package/package.json +1 -1
package/Date/index.js
CHANGED
|
@@ -1954,7 +1954,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1954
1954
|
src: src || null,
|
|
1955
1955
|
size: size || null,
|
|
1956
1956
|
alt: alt || null,
|
|
1957
|
-
inputMode: inputMode ||
|
|
1957
|
+
inputMode: inputMode || undefined,
|
|
1958
1958
|
pattern: pattern || null,
|
|
1959
1959
|
placeholder: placeholder || '',
|
|
1960
1960
|
value: changedVal,
|
|
@@ -5346,7 +5346,6 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5346
5346
|
_modalRef.style.top = 'auto';
|
|
5347
5347
|
_modalRef.style.bottom = window.innerHeight - _triggerBox.top + POS_OFFSET + 2 + 'px';
|
|
5348
5348
|
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
5349
|
-
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
5350
5349
|
_modalRef.classList.add('pos-top');
|
|
5351
5350
|
}
|
|
5352
5351
|
if (targetPos === 'bottom') {
|
package/Input/index.js
CHANGED
|
@@ -1400,7 +1400,7 @@ var Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
|
|
|
1400
1400
|
src: src || null,
|
|
1401
1401
|
size: size || null,
|
|
1402
1402
|
alt: alt || null,
|
|
1403
|
-
inputMode: inputMode ||
|
|
1403
|
+
inputMode: inputMode || undefined,
|
|
1404
1404
|
pattern: pattern || null,
|
|
1405
1405
|
placeholder: placeholder || '',
|
|
1406
1406
|
value: changedVal,
|
package/LiveSearch/index.js
CHANGED
|
@@ -3104,16 +3104,17 @@ var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(
|
|
|
3104
3104
|
// Adjust position
|
|
3105
3105
|
if (targetPos === 'top') {
|
|
3106
3106
|
_modalRef.style.left = x + 'px';
|
|
3107
|
-
_modalRef.style.
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
_modalRef.style.
|
|
3107
|
+
//_modalRef.style.top = y - POS_OFFSET - (listRef.current.clientHeight) - 2 + 'px';
|
|
3108
|
+
_modalRef.style.top = 'auto';
|
|
3109
|
+
_modalRef.style.bottom = window.innerHeight - _triggerBox.top + POS_OFFSET + 2 + 'px';
|
|
3110
|
+
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
3111
3111
|
_modalRef.classList.add('pos-top');
|
|
3112
3112
|
}
|
|
3113
3113
|
if (targetPos === 'bottom') {
|
|
3114
3114
|
_modalRef.style.left = x + 'px';
|
|
3115
3115
|
_modalRef.style.bottom = 'auto';
|
|
3116
3116
|
_modalRef.style.top = y + height + POS_OFFSET + 'px';
|
|
3117
|
+
_modalRef.style.setProperty('position', 'absolute', 'important');
|
|
3117
3118
|
_modalRef.classList.remove('pos-top');
|
|
3118
3119
|
}
|
|
3119
3120
|
|
package/RangeSlider/index.js
CHANGED
|
@@ -1920,7 +1920,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1920
1920
|
src: src || null,
|
|
1921
1921
|
size: size || null,
|
|
1922
1922
|
alt: alt || null,
|
|
1923
|
-
inputMode: inputMode ||
|
|
1923
|
+
inputMode: inputMode || undefined,
|
|
1924
1924
|
pattern: pattern || null,
|
|
1925
1925
|
placeholder: placeholder || '',
|
|
1926
1926
|
value: changedVal,
|
package/Select/index.js
CHANGED
|
@@ -3995,9 +3995,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3995
3995
|
setTimeout(function () {
|
|
3996
3996
|
popwinPosInit();
|
|
3997
3997
|
popwinFilterItems(val);
|
|
3998
|
-
|
|
3999
|
-
// Fix popup position after fetch loading completes
|
|
4000
|
-
fixPopupPositionAfterFetch();
|
|
4001
3998
|
}, 0);
|
|
4002
3999
|
setFetchLoading(false);
|
|
4003
4000
|
});
|
|
@@ -4427,16 +4424,17 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4427
4424
|
// Adjust position
|
|
4428
4425
|
if (targetPos === 'top') {
|
|
4429
4426
|
_modalRef.style.left = x + 'px';
|
|
4430
|
-
_modalRef.style.
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
_modalRef.style.
|
|
4427
|
+
//_modalRef.style.top = y - POS_OFFSET - (listRef.current.clientHeight) - 2 + 'px';
|
|
4428
|
+
_modalRef.style.top = 'auto';
|
|
4429
|
+
_modalRef.style.bottom = window.innerHeight - _triggerBox.top + POS_OFFSET + 2 + 'px';
|
|
4430
|
+
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
4434
4431
|
_modalRef.classList.add('pos-top');
|
|
4435
4432
|
}
|
|
4436
4433
|
if (targetPos === 'bottom') {
|
|
4437
4434
|
_modalRef.style.left = x + 'px';
|
|
4438
4435
|
_modalRef.style.bottom = 'auto';
|
|
4439
4436
|
_modalRef.style.top = y + height + POS_OFFSET + 'px';
|
|
4437
|
+
_modalRef.style.setProperty('position', 'absolute', 'important');
|
|
4440
4438
|
_modalRef.classList.remove('pos-top');
|
|
4441
4439
|
}
|
|
4442
4440
|
|
|
@@ -4581,7 +4579,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4581
4579
|
function popwinContainerHeightAdjust() {
|
|
4582
4580
|
if (listContentRef.current === null) return;
|
|
4583
4581
|
var oldHeight = listContentRef.current.dataset.height;
|
|
4584
|
-
var pos = listContentRef.current.dataset.pos;
|
|
4585
4582
|
var filteredHeight = listContentRef.current.firstChild.clientHeight;
|
|
4586
4583
|
|
|
4587
4584
|
// height restrictions
|
|
@@ -4589,8 +4586,10 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4589
4586
|
filteredHeight = listContainerHeightLimit(filteredHeight);
|
|
4590
4587
|
if (parseFloat(oldHeight) > filteredHeight) {
|
|
4591
4588
|
listContentRef.current.style.height = filteredHeight + 'px';
|
|
4589
|
+
console.log('popwinContainerHeightAdjust - height changed to:', filteredHeight);
|
|
4592
4590
|
} else {
|
|
4593
4591
|
listContentRef.current.style.height = oldHeight + 'px';
|
|
4592
|
+
console.log('popwinContainerHeightAdjust - height kept as:', oldHeight);
|
|
4594
4593
|
}
|
|
4595
4594
|
}
|
|
4596
4595
|
function popwinNoMatchInit() {
|
|
@@ -4622,25 +4621,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4622
4621
|
//
|
|
4623
4622
|
if (selectInputRef.current) selectInputRef.current.value = '';
|
|
4624
4623
|
}
|
|
4625
|
-
function fixPopupPositionAfterFetch() {
|
|
4626
|
-
if (listContentRef.current === null || !isOpen) return;
|
|
4627
|
-
|
|
4628
|
-
// Get the current position data
|
|
4629
|
-
var currentPos = listContentRef.current.dataset.pos;
|
|
4630
|
-
if (currentPos === 'top') {
|
|
4631
|
-
// Recalculate position for upward popup to fix offset issues
|
|
4632
|
-
var _modalRef = document.querySelector("#custom-select__options-wrapper-".concat(idRes));
|
|
4633
|
-
if (_modalRef && rootRef.current && selectInputRef.current) {
|
|
4634
|
-
var _getAbsolutePositionO3 = (0,getElementProperty.getAbsolutePositionOfStage)(rootRef.current),
|
|
4635
|
-
x = _getAbsolutePositionO3.x;
|
|
4636
|
-
var _getAbsolutePositionO4 = (0,getElementProperty.getAbsolutePositionOfStage)(selectInputRef.current),
|
|
4637
|
-
y = _getAbsolutePositionO4.y;
|
|
4638
|
-
_modalRef.style.left = x + 'px';
|
|
4639
|
-
var topPosition = y - POS_OFFSET - listContentRef.current.clientHeight - 2;
|
|
4640
|
-
_modalRef.style.top = topPosition + 'px';
|
|
4641
|
-
}
|
|
4642
|
-
}
|
|
4643
|
-
}
|
|
4644
4624
|
function cancel() {
|
|
4645
4625
|
// hide list
|
|
4646
4626
|
setIsOpen(false);
|
|
@@ -5851,9 +5831,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5851
5831
|
setTimeout(function () {
|
|
5852
5832
|
popwinPosInit();
|
|
5853
5833
|
popwinFilterItems(controlTempValue);
|
|
5854
|
-
|
|
5855
|
-
// Fix popup position after fetch loading completes
|
|
5856
|
-
fixPopupPositionAfterFetch();
|
|
5857
5834
|
}, 0);
|
|
5858
5835
|
});
|
|
5859
5836
|
}
|
|
@@ -5979,9 +5956,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5979
5956
|
setTimeout(function () {
|
|
5980
5957
|
popwinPosInit();
|
|
5981
5958
|
popwinFilterItems(controlTempValue);
|
|
5982
|
-
|
|
5983
|
-
// Fix popup position after fetch loading completes
|
|
5984
|
-
fixPopupPositionAfterFetch();
|
|
5985
5959
|
}, 0);
|
|
5986
5960
|
});
|
|
5987
5961
|
}
|
package/lib/cjs/Date/index.js
CHANGED
|
@@ -1954,7 +1954,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1954
1954
|
src: src || null,
|
|
1955
1955
|
size: size || null,
|
|
1956
1956
|
alt: alt || null,
|
|
1957
|
-
inputMode: inputMode ||
|
|
1957
|
+
inputMode: inputMode || undefined,
|
|
1958
1958
|
pattern: pattern || null,
|
|
1959
1959
|
placeholder: placeholder || '',
|
|
1960
1960
|
value: changedVal,
|
|
@@ -5346,7 +5346,6 @@ var src_Date = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5346
5346
|
_modalRef.style.top = 'auto';
|
|
5347
5347
|
_modalRef.style.bottom = window.innerHeight - _triggerBox.top + POS_OFFSET + 2 + 'px';
|
|
5348
5348
|
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
5349
|
-
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
5350
5349
|
_modalRef.classList.add('pos-top');
|
|
5351
5350
|
}
|
|
5352
5351
|
if (targetPos === 'bottom') {
|
package/lib/cjs/Input/index.js
CHANGED
|
@@ -1400,7 +1400,7 @@ var Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
|
|
|
1400
1400
|
src: src || null,
|
|
1401
1401
|
size: size || null,
|
|
1402
1402
|
alt: alt || null,
|
|
1403
|
-
inputMode: inputMode ||
|
|
1403
|
+
inputMode: inputMode || undefined,
|
|
1404
1404
|
pattern: pattern || null,
|
|
1405
1405
|
placeholder: placeholder || '',
|
|
1406
1406
|
value: changedVal,
|
|
@@ -3104,16 +3104,17 @@ var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(
|
|
|
3104
3104
|
// Adjust position
|
|
3105
3105
|
if (targetPos === 'top') {
|
|
3106
3106
|
_modalRef.style.left = x + 'px';
|
|
3107
|
-
_modalRef.style.
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
_modalRef.style.
|
|
3107
|
+
//_modalRef.style.top = y - POS_OFFSET - (listRef.current.clientHeight) - 2 + 'px';
|
|
3108
|
+
_modalRef.style.top = 'auto';
|
|
3109
|
+
_modalRef.style.bottom = window.innerHeight - _triggerBox.top + POS_OFFSET + 2 + 'px';
|
|
3110
|
+
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
3111
3111
|
_modalRef.classList.add('pos-top');
|
|
3112
3112
|
}
|
|
3113
3113
|
if (targetPos === 'bottom') {
|
|
3114
3114
|
_modalRef.style.left = x + 'px';
|
|
3115
3115
|
_modalRef.style.bottom = 'auto';
|
|
3116
3116
|
_modalRef.style.top = y + height + POS_OFFSET + 'px';
|
|
3117
|
+
_modalRef.style.setProperty('position', 'absolute', 'important');
|
|
3117
3118
|
_modalRef.classList.remove('pos-top');
|
|
3118
3119
|
}
|
|
3119
3120
|
|
|
@@ -1920,7 +1920,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1920
1920
|
src: src || null,
|
|
1921
1921
|
size: size || null,
|
|
1922
1922
|
alt: alt || null,
|
|
1923
|
-
inputMode: inputMode ||
|
|
1923
|
+
inputMode: inputMode || undefined,
|
|
1924
1924
|
pattern: pattern || null,
|
|
1925
1925
|
placeholder: placeholder || '',
|
|
1926
1926
|
value: changedVal,
|
package/lib/cjs/Select/index.js
CHANGED
|
@@ -3995,9 +3995,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3995
3995
|
setTimeout(function () {
|
|
3996
3996
|
popwinPosInit();
|
|
3997
3997
|
popwinFilterItems(val);
|
|
3998
|
-
|
|
3999
|
-
// Fix popup position after fetch loading completes
|
|
4000
|
-
fixPopupPositionAfterFetch();
|
|
4001
3998
|
}, 0);
|
|
4002
3999
|
setFetchLoading(false);
|
|
4003
4000
|
});
|
|
@@ -4427,16 +4424,17 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4427
4424
|
// Adjust position
|
|
4428
4425
|
if (targetPos === 'top') {
|
|
4429
4426
|
_modalRef.style.left = x + 'px';
|
|
4430
|
-
_modalRef.style.
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
_modalRef.style.
|
|
4427
|
+
//_modalRef.style.top = y - POS_OFFSET - (listRef.current.clientHeight) - 2 + 'px';
|
|
4428
|
+
_modalRef.style.top = 'auto';
|
|
4429
|
+
_modalRef.style.bottom = window.innerHeight - _triggerBox.top + POS_OFFSET + 2 + 'px';
|
|
4430
|
+
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
4434
4431
|
_modalRef.classList.add('pos-top');
|
|
4435
4432
|
}
|
|
4436
4433
|
if (targetPos === 'bottom') {
|
|
4437
4434
|
_modalRef.style.left = x + 'px';
|
|
4438
4435
|
_modalRef.style.bottom = 'auto';
|
|
4439
4436
|
_modalRef.style.top = y + height + POS_OFFSET + 'px';
|
|
4437
|
+
_modalRef.style.setProperty('position', 'absolute', 'important');
|
|
4440
4438
|
_modalRef.classList.remove('pos-top');
|
|
4441
4439
|
}
|
|
4442
4440
|
|
|
@@ -4581,7 +4579,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4581
4579
|
function popwinContainerHeightAdjust() {
|
|
4582
4580
|
if (listContentRef.current === null) return;
|
|
4583
4581
|
var oldHeight = listContentRef.current.dataset.height;
|
|
4584
|
-
var pos = listContentRef.current.dataset.pos;
|
|
4585
4582
|
var filteredHeight = listContentRef.current.firstChild.clientHeight;
|
|
4586
4583
|
|
|
4587
4584
|
// height restrictions
|
|
@@ -4589,8 +4586,10 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4589
4586
|
filteredHeight = listContainerHeightLimit(filteredHeight);
|
|
4590
4587
|
if (parseFloat(oldHeight) > filteredHeight) {
|
|
4591
4588
|
listContentRef.current.style.height = filteredHeight + 'px';
|
|
4589
|
+
console.log('popwinContainerHeightAdjust - height changed to:', filteredHeight);
|
|
4592
4590
|
} else {
|
|
4593
4591
|
listContentRef.current.style.height = oldHeight + 'px';
|
|
4592
|
+
console.log('popwinContainerHeightAdjust - height kept as:', oldHeight);
|
|
4594
4593
|
}
|
|
4595
4594
|
}
|
|
4596
4595
|
function popwinNoMatchInit() {
|
|
@@ -4622,25 +4621,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4622
4621
|
//
|
|
4623
4622
|
if (selectInputRef.current) selectInputRef.current.value = '';
|
|
4624
4623
|
}
|
|
4625
|
-
function fixPopupPositionAfterFetch() {
|
|
4626
|
-
if (listContentRef.current === null || !isOpen) return;
|
|
4627
|
-
|
|
4628
|
-
// Get the current position data
|
|
4629
|
-
var currentPos = listContentRef.current.dataset.pos;
|
|
4630
|
-
if (currentPos === 'top') {
|
|
4631
|
-
// Recalculate position for upward popup to fix offset issues
|
|
4632
|
-
var _modalRef = document.querySelector("#custom-select__options-wrapper-".concat(idRes));
|
|
4633
|
-
if (_modalRef && rootRef.current && selectInputRef.current) {
|
|
4634
|
-
var _getAbsolutePositionO3 = (0,getElementProperty.getAbsolutePositionOfStage)(rootRef.current),
|
|
4635
|
-
x = _getAbsolutePositionO3.x;
|
|
4636
|
-
var _getAbsolutePositionO4 = (0,getElementProperty.getAbsolutePositionOfStage)(selectInputRef.current),
|
|
4637
|
-
y = _getAbsolutePositionO4.y;
|
|
4638
|
-
_modalRef.style.left = x + 'px';
|
|
4639
|
-
var topPosition = y - POS_OFFSET - listContentRef.current.clientHeight - 2;
|
|
4640
|
-
_modalRef.style.top = topPosition + 'px';
|
|
4641
|
-
}
|
|
4642
|
-
}
|
|
4643
|
-
}
|
|
4644
4624
|
function cancel() {
|
|
4645
4625
|
// hide list
|
|
4646
4626
|
setIsOpen(false);
|
|
@@ -5851,9 +5831,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5851
5831
|
setTimeout(function () {
|
|
5852
5832
|
popwinPosInit();
|
|
5853
5833
|
popwinFilterItems(controlTempValue);
|
|
5854
|
-
|
|
5855
|
-
// Fix popup position after fetch loading completes
|
|
5856
|
-
fixPopupPositionAfterFetch();
|
|
5857
5834
|
}, 0);
|
|
5858
5835
|
});
|
|
5859
5836
|
}
|
|
@@ -5979,9 +5956,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5979
5956
|
setTimeout(function () {
|
|
5980
5957
|
popwinPosInit();
|
|
5981
5958
|
popwinFilterItems(controlTempValue);
|
|
5982
|
-
|
|
5983
|
-
// Fix popup position after fetch loading completes
|
|
5984
|
-
fixPopupPositionAfterFetch();
|
|
5985
5959
|
}, 0);
|
|
5986
5960
|
});
|
|
5987
5961
|
}
|
package/lib/esm/Date/index.tsx
CHANGED
|
@@ -540,7 +540,6 @@ const Date = forwardRef((props: DateProps, externalRef: any) => {
|
|
|
540
540
|
_modalRef.style.top = 'auto';
|
|
541
541
|
_modalRef.style.bottom = (window.innerHeight - _triggerBox.top) + POS_OFFSET + 2 + 'px';
|
|
542
542
|
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
543
|
-
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
544
543
|
_modalRef.classList.add('pos-top');
|
|
545
544
|
}
|
|
546
545
|
|
package/lib/esm/Input/index.tsx
CHANGED
|
@@ -545,7 +545,7 @@ const Input = forwardRef((props: InputProps, externalRef: any) => {
|
|
|
545
545
|
src={src || null}
|
|
546
546
|
size={size || null}
|
|
547
547
|
alt={alt || null}
|
|
548
|
-
inputMode={inputMode ||
|
|
548
|
+
inputMode={inputMode || undefined}
|
|
549
549
|
pattern={pattern || null}
|
|
550
550
|
placeholder={placeholder || ''}
|
|
551
551
|
value={changedVal}
|
|
@@ -362,10 +362,10 @@ const LiveSearch = forwardRef((props: LiveSearchProps, externalRef: any) => {
|
|
|
362
362
|
// Adjust position
|
|
363
363
|
if (targetPos === 'top') {
|
|
364
364
|
_modalRef.style.left = x + 'px';
|
|
365
|
-
_modalRef.style.
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
_modalRef.style.
|
|
365
|
+
//_modalRef.style.top = y - POS_OFFSET - (listRef.current.clientHeight) - 2 + 'px';
|
|
366
|
+
_modalRef.style.top = 'auto';
|
|
367
|
+
_modalRef.style.bottom = (window.innerHeight - _triggerBox.top) + POS_OFFSET + 2 + 'px';
|
|
368
|
+
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
369
369
|
_modalRef.classList.add('pos-top');
|
|
370
370
|
|
|
371
371
|
}
|
|
@@ -374,6 +374,7 @@ const LiveSearch = forwardRef((props: LiveSearchProps, externalRef: any) => {
|
|
|
374
374
|
_modalRef.style.left = x + 'px';
|
|
375
375
|
_modalRef.style.bottom = 'auto';
|
|
376
376
|
_modalRef.style.top = y + height + POS_OFFSET + 'px';
|
|
377
|
+
_modalRef.style.setProperty('position', 'absolute', 'important');
|
|
377
378
|
_modalRef.classList.remove('pos-top');
|
|
378
379
|
}
|
|
379
380
|
|
package/lib/esm/Select/index.tsx
CHANGED
|
@@ -505,9 +505,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
505
505
|
popwinPosInit();
|
|
506
506
|
popwinFilterItems(val);
|
|
507
507
|
|
|
508
|
-
// Fix popup position after fetch loading completes
|
|
509
|
-
fixPopupPositionAfterFetch();
|
|
510
|
-
|
|
511
508
|
}, 0);
|
|
512
509
|
|
|
513
510
|
setFetchLoading(false);
|
|
@@ -519,7 +516,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
519
516
|
setTimeout(() => {
|
|
520
517
|
popwinPosInit();
|
|
521
518
|
popwinFilterItems(val);
|
|
522
|
-
|
|
523
519
|
}, 0);
|
|
524
520
|
|
|
525
521
|
setFetchLoading(false);
|
|
@@ -971,10 +967,10 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
971
967
|
// Adjust position
|
|
972
968
|
if (targetPos === 'top') {
|
|
973
969
|
_modalRef.style.left = x + 'px';
|
|
974
|
-
_modalRef.style.
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
_modalRef.style.
|
|
970
|
+
//_modalRef.style.top = y - POS_OFFSET - (listRef.current.clientHeight) - 2 + 'px';
|
|
971
|
+
_modalRef.style.top = 'auto';
|
|
972
|
+
_modalRef.style.bottom = (window.innerHeight - _triggerBox.top) + POS_OFFSET + 2 + 'px';
|
|
973
|
+
_modalRef.style.setProperty('position', 'fixed', 'important');
|
|
978
974
|
_modalRef.classList.add('pos-top');
|
|
979
975
|
|
|
980
976
|
}
|
|
@@ -983,6 +979,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
983
979
|
_modalRef.style.left = x + 'px';
|
|
984
980
|
_modalRef.style.bottom = 'auto';
|
|
985
981
|
_modalRef.style.top = y + height + POS_OFFSET + 'px';
|
|
982
|
+
_modalRef.style.setProperty('position', 'absolute', 'important');
|
|
986
983
|
_modalRef.classList.remove('pos-top');
|
|
987
984
|
}
|
|
988
985
|
|
|
@@ -1171,7 +1168,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1171
1168
|
if (listContentRef.current === null) return;
|
|
1172
1169
|
|
|
1173
1170
|
let oldHeight = listContentRef.current.dataset.height;
|
|
1174
|
-
const pos = listContentRef.current.dataset.pos;
|
|
1175
1171
|
let filteredHeight = listContentRef.current.firstChild.clientHeight;
|
|
1176
1172
|
|
|
1177
1173
|
// height restrictions
|
|
@@ -1181,8 +1177,10 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1181
1177
|
|
|
1182
1178
|
if (parseFloat(oldHeight) > filteredHeight) {
|
|
1183
1179
|
listContentRef.current.style.height = filteredHeight + 'px';
|
|
1180
|
+
console.log('popwinContainerHeightAdjust - height changed to:', filteredHeight);
|
|
1184
1181
|
} else {
|
|
1185
1182
|
listContentRef.current.style.height = oldHeight + 'px';
|
|
1183
|
+
console.log('popwinContainerHeightAdjust - height kept as:', oldHeight);
|
|
1186
1184
|
}
|
|
1187
1185
|
|
|
1188
1186
|
}
|
|
@@ -1227,26 +1225,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1227
1225
|
|
|
1228
1226
|
}
|
|
1229
1227
|
|
|
1230
|
-
|
|
1231
|
-
function fixPopupPositionAfterFetch() {
|
|
1232
|
-
if (listContentRef.current === null || !isOpen) return;
|
|
1233
|
-
|
|
1234
|
-
// Get the current position data
|
|
1235
|
-
const currentPos = listContentRef.current.dataset.pos;
|
|
1236
|
-
|
|
1237
|
-
if (currentPos === 'top') {
|
|
1238
|
-
// Recalculate position for upward popup to fix offset issues
|
|
1239
|
-
const _modalRef: any = document.querySelector(`#custom-select__options-wrapper-${idRes}`);
|
|
1240
|
-
if (_modalRef && rootRef.current && selectInputRef.current) {
|
|
1241
|
-
const { x } = getAbsolutePositionOfStage(rootRef.current);
|
|
1242
|
-
const { y } = getAbsolutePositionOfStage(selectInputRef.current);
|
|
1243
|
-
|
|
1244
|
-
_modalRef.style.left = x + 'px';
|
|
1245
|
-
const topPosition = y - POS_OFFSET - (listContentRef.current.clientHeight) - 2;
|
|
1246
|
-
_modalRef.style.top = topPosition + 'px';
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
1228
|
|
|
1251
1229
|
|
|
1252
1230
|
function cancel() {
|
|
@@ -1947,7 +1925,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1947
1925
|
if (MANUAL_REQ && val !== '') {
|
|
1948
1926
|
popwinPosInit();
|
|
1949
1927
|
}
|
|
1950
|
-
|
|
1951
1928
|
|
|
1952
1929
|
}
|
|
1953
1930
|
|
|
@@ -2546,9 +2523,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
2546
2523
|
popwinPosInit();
|
|
2547
2524
|
popwinFilterItems(controlTempValue);
|
|
2548
2525
|
|
|
2549
|
-
// Fix popup position after fetch loading completes
|
|
2550
|
-
fixPopupPositionAfterFetch();
|
|
2551
|
-
|
|
2552
2526
|
}, 0);
|
|
2553
2527
|
});
|
|
2554
2528
|
|
|
@@ -2822,9 +2796,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
2822
2796
|
popwinPosInit();
|
|
2823
2797
|
popwinFilterItems(controlTempValue);
|
|
2824
2798
|
|
|
2825
|
-
// Fix popup position after fetch loading completes
|
|
2826
|
-
fixPopupPositionAfterFetch();
|
|
2827
|
-
|
|
2828
2799
|
}, 0);
|
|
2829
2800
|
});
|
|
2830
2801
|
}}>
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "UIUX Lab",
|
|
3
3
|
"email": "uiuxlab@gmail.com",
|
|
4
4
|
"name": "funda-ui",
|
|
5
|
-
"version": "4.7.
|
|
5
|
+
"version": "4.7.565",
|
|
6
6
|
"description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|