funda-ui 1.0.418 → 1.0.500
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/LiveSearch/index.js
CHANGED
|
@@ -718,7 +718,10 @@ var LiveSearch = function LiveSearch(props) {
|
|
|
718
718
|
var newH = maxHeight - (elTop > window.innerHeight / 2 ? 0 : elTop) + elMinWindowSpacing;
|
|
719
719
|
|
|
720
720
|
// default position
|
|
721
|
-
|
|
721
|
+
if (newH < maxHeight) {
|
|
722
|
+
// Prevent the height of `elTop` to negatively not match the problem
|
|
723
|
+
listContentRef.current.style.height = newH + 'px';
|
|
724
|
+
}
|
|
722
725
|
|
|
723
726
|
// if it's on top
|
|
724
727
|
if (newH > maxHeight) {
|
package/MultiFuncSelect/index.js
CHANGED
|
@@ -633,7 +633,10 @@ var MultiFuncSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
633
633
|
var newH = maxHeight - (elTop > window.innerHeight / 2 ? 0 : elTop) + elMinWindowSpacing;
|
|
634
634
|
|
|
635
635
|
// default position
|
|
636
|
-
|
|
636
|
+
if (newH < maxHeight) {
|
|
637
|
+
// Prevent the height of `elTop` to negatively not match the problem
|
|
638
|
+
listContentRef.current.style.height = newH + 'px';
|
|
639
|
+
}
|
|
637
640
|
|
|
638
641
|
// if it's on top
|
|
639
642
|
if (newH > maxHeight) {
|
|
@@ -718,7 +718,10 @@ var LiveSearch = function LiveSearch(props) {
|
|
|
718
718
|
var newH = maxHeight - (elTop > window.innerHeight / 2 ? 0 : elTop) + elMinWindowSpacing;
|
|
719
719
|
|
|
720
720
|
// default position
|
|
721
|
-
|
|
721
|
+
if (newH < maxHeight) {
|
|
722
|
+
// Prevent the height of `elTop` to negatively not match the problem
|
|
723
|
+
listContentRef.current.style.height = newH + 'px';
|
|
724
|
+
}
|
|
722
725
|
|
|
723
726
|
// if it's on top
|
|
724
727
|
if (newH > maxHeight) {
|
|
@@ -633,7 +633,10 @@ var MultiFuncSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
633
633
|
var newH = maxHeight - (elTop > window.innerHeight / 2 ? 0 : elTop) + elMinWindowSpacing;
|
|
634
634
|
|
|
635
635
|
// default position
|
|
636
|
-
|
|
636
|
+
if (newH < maxHeight) {
|
|
637
|
+
// Prevent the height of `elTop` to negatively not match the problem
|
|
638
|
+
listContentRef.current.style.height = newH + 'px';
|
|
639
|
+
}
|
|
637
640
|
|
|
638
641
|
// if it's on top
|
|
639
642
|
if (newH > maxHeight) {
|
|
@@ -158,7 +158,9 @@ const LiveSearch = (props: LiveSearchProps) => {
|
|
|
158
158
|
const newH = maxHeight - (elTop > window.innerHeight/2 ? 0 : elTop) + elMinWindowSpacing;
|
|
159
159
|
|
|
160
160
|
// default position
|
|
161
|
-
|
|
161
|
+
if (newH < maxHeight) { // Prevent the height of `elTop` to negatively not match the problem
|
|
162
|
+
listContentRef.current.style.height = newH + 'px';
|
|
163
|
+
}
|
|
162
164
|
|
|
163
165
|
|
|
164
166
|
// if it's on top
|
|
@@ -167,9 +167,11 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
167
167
|
//performance
|
|
168
168
|
const handleChangeFetchSafe = useThrottle((val: any) => {
|
|
169
169
|
|
|
170
|
+
|
|
170
171
|
let _orginalData: OptionConfig[] = [];
|
|
171
172
|
const update = (inputData: any) => {
|
|
172
173
|
const filterRes = (data: any[]) => {
|
|
174
|
+
|
|
173
175
|
return inputData.filter((item: any) => {
|
|
174
176
|
|
|
175
177
|
// Avoid fatal errors causing page crashes
|
|
@@ -189,6 +191,7 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
189
191
|
return false;
|
|
190
192
|
}
|
|
191
193
|
});
|
|
194
|
+
|
|
192
195
|
}
|
|
193
196
|
|
|
194
197
|
setOptionsData(filterRes);
|
|
@@ -301,7 +304,6 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
301
304
|
function getPlacement(el: HTMLElement, restorePos: boolean = false) {
|
|
302
305
|
|
|
303
306
|
if ( el === null ) return;
|
|
304
|
-
|
|
305
307
|
|
|
306
308
|
const PLACEMENT_TOP = 'top-0';
|
|
307
309
|
const PLACEMENT_BOTTOMEND = 'bottom-0';
|
|
@@ -345,7 +347,10 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
345
347
|
const newH = maxHeight - (elTop > window.innerHeight/2 ? 0 : elTop) + elMinWindowSpacing;
|
|
346
348
|
|
|
347
349
|
// default position
|
|
348
|
-
|
|
350
|
+
if (newH < maxHeight) { // Prevent the height of `elTop` to negatively not match the problem
|
|
351
|
+
listContentRef.current.style.height = newH + 'px';
|
|
352
|
+
}
|
|
353
|
+
|
|
349
354
|
|
|
350
355
|
|
|
351
356
|
// if it's on top
|
|
@@ -1098,7 +1103,8 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
1098
1103
|
|
|
1099
1104
|
|
|
1100
1105
|
|
|
1101
|
-
function handleComposition(event: any) {
|
|
1106
|
+
function handleComposition(event: any) {
|
|
1107
|
+
|
|
1102
1108
|
if (event.type === 'compositionstart' || event.type === 'compositionend') {
|
|
1103
1109
|
//fire change method to update for Chrome v53
|
|
1104
1110
|
handleChange(event);
|
|
@@ -1106,11 +1112,13 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
1106
1112
|
}
|
|
1107
1113
|
|
|
1108
1114
|
function handleChange(event: any) {
|
|
1115
|
+
|
|
1109
1116
|
const val = event.target.value;
|
|
1110
1117
|
|
|
1111
1118
|
// update temporary value
|
|
1112
1119
|
setControlTempValue(val);
|
|
1113
1120
|
|
|
1121
|
+
|
|
1114
1122
|
//
|
|
1115
1123
|
if ( val.replace(/\s/g, "") === '' ) {
|
|
1116
1124
|
// No elements found. Consider changing the search query.
|
|
@@ -1508,7 +1516,6 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
|
|
|
1508
1516
|
</button>
|
|
1509
1517
|
</> : null}
|
|
1510
1518
|
|
|
1511
|
-
|
|
1512
1519
|
{optionsData ? optionsData.map((item, index) => {
|
|
1513
1520
|
const startItemBorder = index === 0 ? 'border-top-0' : '';
|
|
1514
1521
|
const endItemBorder = index === optionsData.length - 1 ? 'border-bottom-0' : '';
|
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": "1.0.
|
|
5
|
+
"version": "1.0.500",
|
|
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",
|