funda-ui 4.7.152 → 4.7.161
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/CascadingSelect/index.js +13 -6
- package/CascadingSelectE2E/index.js +13 -6
- package/Chatbox/index.css +8 -0
- package/Chatbox/index.d.ts +1 -0
- package/Chatbox/index.js +18 -8
- package/Date/index.js +13 -6
- package/DropdownMenu/index.js +13 -6
- package/EventCalendar/index.js +42 -35
- package/EventCalendarTimeline/index.js +55 -41
- package/LiveSearch/index.css +33 -0
- package/LiveSearch/index.d.ts +1 -0
- package/LiveSearch/index.js +186 -91
- package/ModalDialog/index.js +13 -6
- package/RootPortal/index.d.ts +2 -1
- package/RootPortal/index.js +13 -6
- package/Select/index.js +81 -72
- package/Toast/index.js +13 -6
- package/Tooltip/index.js +13 -6
- package/lib/cjs/CascadingSelect/index.js +13 -6
- package/lib/cjs/CascadingSelectE2E/index.js +13 -6
- package/lib/cjs/Chatbox/index.d.ts +1 -0
- package/lib/cjs/Chatbox/index.js +18 -8
- package/lib/cjs/Date/index.js +13 -6
- package/lib/cjs/DropdownMenu/index.js +13 -6
- package/lib/cjs/EventCalendar/index.js +42 -35
- package/lib/cjs/EventCalendarTimeline/index.js +55 -41
- package/lib/cjs/LiveSearch/index.d.ts +1 -0
- package/lib/cjs/LiveSearch/index.js +186 -91
- package/lib/cjs/ModalDialog/index.js +13 -6
- package/lib/cjs/RootPortal/index.d.ts +2 -1
- package/lib/cjs/RootPortal/index.js +13 -6
- package/lib/cjs/Select/index.js +81 -72
- package/lib/cjs/Toast/index.js +13 -6
- package/lib/cjs/Tooltip/index.js +13 -6
- package/lib/css/Chatbox/index.css +8 -0
- package/lib/css/LiveSearch/index.css +33 -0
- package/lib/esm/Chatbox/index.scss +9 -0
- package/lib/esm/Chatbox/index.tsx +7 -4
- package/lib/esm/LiveSearch/index.scss +47 -0
- package/lib/esm/LiveSearch/index.tsx +120 -64
- package/lib/esm/RootPortal/index.tsx +14 -8
- package/lib/esm/SearchBar/index.tsx +1 -0
- package/lib/esm/Select/index.tsx +65 -64
- package/lib/esm/Textarea/index.tsx +1 -0
- package/package.json +1 -1
package/lib/esm/Select/index.tsx
CHANGED
|
@@ -51,6 +51,8 @@ import {
|
|
|
51
51
|
import { clsWrite, combinedCls } from 'funda-utils/dist/cjs/cls';
|
|
52
52
|
|
|
53
53
|
|
|
54
|
+
|
|
55
|
+
|
|
54
56
|
export type SelectOptionChangeFnType = (arg1: any, arg2: any, arg3: any) => void;
|
|
55
57
|
|
|
56
58
|
export interface MultiSelectDataConfig {
|
|
@@ -201,7 +203,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
201
203
|
firstRequestAutoExec,
|
|
202
204
|
fetchTrigger,
|
|
203
205
|
fetchTriggerForDefaultData,
|
|
204
|
-
fetchNoneInfo,
|
|
206
|
+
fetchNoneInfo = 'No match yet',
|
|
205
207
|
fetchUpdate,
|
|
206
208
|
fetchFuncAsync,
|
|
207
209
|
fetchFuncMethod,
|
|
@@ -262,12 +264,17 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
262
264
|
const [controlValue, setControlValue] = useState<string | undefined>('');
|
|
263
265
|
|
|
264
266
|
//
|
|
265
|
-
const [controlTempValue, setControlTempValue] = useState<string | null>(null);
|
|
267
|
+
const [controlTempValue, setControlTempValue] = useState<string | null>(null); // Storage for temporary input
|
|
266
268
|
const [isOpen, setIsOpen] = useState<boolean>(false);
|
|
267
269
|
const [incomingData, setIncomingData] = useState<string | null | undefined>(null);
|
|
268
270
|
const [firstRequestExecuted, setFirstRequestExecuted] = useState<boolean>(false);
|
|
269
271
|
const [handleFirstFetchCompleted, setHandleFirstFetchCompleted] = useState<boolean>(false);
|
|
270
272
|
|
|
273
|
+
// Mark whether it is out of focus
|
|
274
|
+
// Fixed the issue that caused the pop-up window to still display due to
|
|
275
|
+
// the delayed close in handleBlur and the timing of the call to popwinPosInit
|
|
276
|
+
const isBlurringRef = useRef<boolean>(false);
|
|
277
|
+
|
|
271
278
|
// filter status
|
|
272
279
|
const [filterItemsHasNoMatchData, setFilterItemsHasNoMatchData] = useState<boolean>(false);
|
|
273
280
|
|
|
@@ -504,10 +511,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
504
511
|
|
|
505
512
|
async function fetchData(params: any, valueToInputDefault: any, inputDefault: any, init: boolean = true) {
|
|
506
513
|
|
|
507
|
-
// get incoming options from `data-options` of component
|
|
508
|
-
// It is usually used for complex cascading `<Select />` components
|
|
509
|
-
const incomingOptionsData = valueInputRef.current.dataset.options;
|
|
510
|
-
|
|
511
514
|
|
|
512
515
|
// Determine whether the default value is user query input or default input
|
|
513
516
|
const defaultValue = init ? valueToInputDefault : '';
|
|
@@ -534,16 +537,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
534
537
|
|
|
535
538
|
|
|
536
539
|
// STEP 1: ===========
|
|
537
|
-
// get incoming options from `data-options` of component
|
|
538
|
-
if (typeof incomingOptionsData !== 'undefined') {
|
|
539
|
-
_ORGIN_DATA = JSON.parse(incomingOptionsData);
|
|
540
|
-
|
|
541
|
-
// set value if the attribute `data-options` of component exists, only valid for single selection (it may be an empty array)
|
|
542
|
-
if (typeof defaultValue !== 'undefined' && defaultValue !== '') valueInputRef.current.dataset.value = defaultValue;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
// STEP 2: ===========
|
|
547
540
|
// Set hierarchical categories ( with sub-categories )
|
|
548
541
|
if (hierarchical) {
|
|
549
542
|
_ORGIN_DATA = addTreeDepth(_ORGIN_DATA);
|
|
@@ -551,14 +544,14 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
551
544
|
}
|
|
552
545
|
|
|
553
546
|
|
|
554
|
-
// STEP
|
|
547
|
+
// STEP 2: ===========
|
|
555
548
|
// Flatten the group
|
|
556
549
|
_ORGIN_DATA = optionsCustomSelectFlat(_ORGIN_DATA);
|
|
557
550
|
|
|
558
551
|
|
|
559
552
|
|
|
560
553
|
|
|
561
|
-
// STEP
|
|
554
|
+
// STEP 3: ===========
|
|
562
555
|
// value & label must be initialized
|
|
563
556
|
let filterRes: any = [];
|
|
564
557
|
|
|
@@ -592,7 +585,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
592
585
|
|
|
593
586
|
|
|
594
587
|
|
|
595
|
-
// STEP
|
|
588
|
+
// STEP 4: ===========
|
|
596
589
|
// ++++++++++++++++++++
|
|
597
590
|
// Single selection
|
|
598
591
|
// ++++++++++++++++++++
|
|
@@ -673,7 +666,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
673
666
|
|
|
674
667
|
}
|
|
675
668
|
|
|
676
|
-
// STEP
|
|
669
|
+
// STEP 5: ===========
|
|
677
670
|
//
|
|
678
671
|
// remove Duplicate objects from JSON Array
|
|
679
672
|
optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
|
|
@@ -685,7 +678,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
685
678
|
setOrginalData(_ORGIN_DATA);
|
|
686
679
|
|
|
687
680
|
|
|
688
|
-
// STEP
|
|
681
|
+
// STEP 6: ===========
|
|
689
682
|
//
|
|
690
683
|
onFetch?.(selectInputRef.current, valueInputRef.current, defaultValue, _ORGIN_DATA, incomingData);
|
|
691
684
|
|
|
@@ -699,17 +692,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
699
692
|
|
|
700
693
|
|
|
701
694
|
// STEP 1: ===========
|
|
702
|
-
// get incoming options from `data-options` of component
|
|
703
|
-
if (typeof incomingOptionsData !== 'undefined') {
|
|
704
|
-
staticOptionsData = JSON.parse(incomingOptionsData);
|
|
705
|
-
|
|
706
|
-
// set value if the attribute `data-options` of component exists, only valid for single selection (it may be an empty array)
|
|
707
|
-
if (typeof defaultValue !== 'undefined' && defaultValue !== '') valueInputRef.current.dataset.value = defaultValue;
|
|
708
|
-
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
// STEP 2: ===========
|
|
713
695
|
// Set hierarchical categories ( with sub-categories )
|
|
714
696
|
if (hierarchical) {
|
|
715
697
|
staticOptionsData = addTreeDepth(staticOptionsData);
|
|
@@ -717,12 +699,12 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
717
699
|
}
|
|
718
700
|
|
|
719
701
|
|
|
720
|
-
// STEP
|
|
702
|
+
// STEP 2: ===========
|
|
721
703
|
// Flatten the group
|
|
722
704
|
staticOptionsData = optionsCustomSelectFlat(staticOptionsData);
|
|
723
705
|
|
|
724
706
|
|
|
725
|
-
// STEP
|
|
707
|
+
// STEP 3: ===========
|
|
726
708
|
// value & label must be initialized
|
|
727
709
|
|
|
728
710
|
// If the default value is label, match value
|
|
@@ -741,7 +723,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
741
723
|
|
|
742
724
|
|
|
743
725
|
|
|
744
|
-
// STEP
|
|
726
|
+
// STEP 4: ===========
|
|
745
727
|
// ++++++++++++++++++++
|
|
746
728
|
// Single selection
|
|
747
729
|
// ++++++++++++++++++++
|
|
@@ -818,7 +800,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
818
800
|
|
|
819
801
|
}
|
|
820
802
|
|
|
821
|
-
// STEP
|
|
803
|
+
// STEP 5: ===========
|
|
822
804
|
//
|
|
823
805
|
// remove Duplicate objects from JSON Array
|
|
824
806
|
optionsFormatGroupOpt(staticOptionsData); // prevent the value from being filtered out
|
|
@@ -830,7 +812,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
830
812
|
//
|
|
831
813
|
setOrginalData(staticOptionsData);
|
|
832
814
|
|
|
833
|
-
// STEP
|
|
815
|
+
// STEP 6: ===========
|
|
834
816
|
//
|
|
835
817
|
onFetch?.(selectInputRef.current, valueInputRef.current, defaultValue, staticOptionsData, incomingData);
|
|
836
818
|
|
|
@@ -864,7 +846,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
864
846
|
}, 0);
|
|
865
847
|
}
|
|
866
848
|
|
|
867
|
-
|
|
868
849
|
function syncListContentScrollBody() {
|
|
869
850
|
const el: any = listContentRef.current;
|
|
870
851
|
if (el === null) return;
|
|
@@ -885,6 +866,10 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
885
866
|
function popwinPosInit(scrollbarInit: boolean = true) {
|
|
886
867
|
if (listContentRef.current === null || rootRef.current === null || selectInputRef.current === null) return;
|
|
887
868
|
|
|
869
|
+
// If it is out of focus, do not perform position initialization
|
|
870
|
+
if (isBlurringRef.current) return;
|
|
871
|
+
|
|
872
|
+
//
|
|
888
873
|
const contentHeightOffset = 80;
|
|
889
874
|
let contentMaxHeight = 0;
|
|
890
875
|
|
|
@@ -1098,8 +1083,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1098
1083
|
function popwinFilterItems(val: any) {
|
|
1099
1084
|
if (listContentRef.current === null) return;
|
|
1100
1085
|
|
|
1101
|
-
|
|
1102
|
-
let invisibleItems: number = 0;
|
|
1103
1086
|
[].slice.call(listContentRef.current.querySelectorAll('.custom-select-multi__control-option-item')).forEach((node: any) => {
|
|
1104
1087
|
|
|
1105
1088
|
// Avoid fatal errors causing page crashes
|
|
@@ -1255,7 +1238,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1255
1238
|
setTimeout(() => {
|
|
1256
1239
|
popwinPosInit();
|
|
1257
1240
|
}, 0);
|
|
1258
|
-
|
|
1259
1241
|
}
|
|
1260
1242
|
});
|
|
1261
1243
|
|
|
@@ -1295,9 +1277,20 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1295
1277
|
selectInputRef.current.select();
|
|
1296
1278
|
}
|
|
1297
1279
|
|
|
1280
|
+
|
|
1281
|
+
// Every time the input changes or the search button is clicked, a data request will be triggered
|
|
1282
|
+
if (MANUAL_REQ && (controlTempValue === '' || controlTempValue === null)) {
|
|
1283
|
+
setTimeout(() => {
|
|
1284
|
+
popwinPosHide();
|
|
1285
|
+
}, 0);
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
|
|
1298
1289
|
// update temporary value
|
|
1299
1290
|
setControlTempValue('');
|
|
1300
1291
|
|
|
1292
|
+
|
|
1293
|
+
|
|
1301
1294
|
|
|
1302
1295
|
// Locks the page
|
|
1303
1296
|
//
|
|
@@ -1323,11 +1316,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1323
1316
|
const curItem: any = el === null ? (isObject(dataInput) ? dataInput : JSON.parse(dataInput)) : optionsData[Number(el.currentTarget.dataset.index)];
|
|
1324
1317
|
|
|
1325
1318
|
|
|
1326
|
-
// get incoming options from `data-options` of component
|
|
1327
|
-
// It is usually used for complex cascading `<Select />` components
|
|
1328
|
-
const incominggetOptionsData = valueInputRef.current.dataset.options;
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
1319
|
// get options
|
|
1332
1320
|
const options = [].slice.call(listRef.current.querySelectorAll('.list-group-item:not(.hide):not(.no-match)'));
|
|
1333
1321
|
|
|
@@ -1398,13 +1386,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1398
1386
|
setControlLabel(formatIndentVal(_label, INDENT_LAST_PLACEHOLDER));
|
|
1399
1387
|
|
|
1400
1388
|
|
|
1401
|
-
// set value if the attribute `data-options` of component exists, only valid for single selection (it may be an empty array)
|
|
1402
|
-
if (typeof incominggetOptionsData !== 'undefined') {
|
|
1403
|
-
valueInputRef.current.dataset.value = _value;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
1389
|
// ++++++++++++++++++++
|
|
1409
1390
|
// Multiple selection
|
|
1410
1391
|
// ++++++++++++++++++++
|
|
@@ -1547,11 +1528,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1547
1528
|
setControlValue(_value);
|
|
1548
1529
|
setControlLabel(formatIndentVal(_label, INDENT_LAST_PLACEHOLDER));
|
|
1549
1530
|
|
|
1550
|
-
// set value if the attribute `data-options` of component exists, only valid for single selection (it may be an empty array)
|
|
1551
|
-
if (typeof incominggetOptionsData !== 'undefined') {
|
|
1552
|
-
valueInputRef.current.dataset.value = _value;
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
1531
|
|
|
1556
1532
|
// ++++++++++++++++++++
|
|
1557
1533
|
// Multiple selection
|
|
@@ -1841,6 +1817,9 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1841
1817
|
|
|
1842
1818
|
function handleShowList() {
|
|
1843
1819
|
|
|
1820
|
+
// Reset the out-of-focus marker
|
|
1821
|
+
isBlurringRef.current = false;
|
|
1822
|
+
|
|
1844
1823
|
//
|
|
1845
1824
|
if (!isOpen) {
|
|
1846
1825
|
activate();
|
|
@@ -1868,6 +1847,11 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1868
1847
|
|
|
1869
1848
|
|
|
1870
1849
|
async function handleFirstFetch(inputVal: any = null) {
|
|
1850
|
+
|
|
1851
|
+
// If manual requests are enabled, do not send them for the first time
|
|
1852
|
+
if (MANUAL_REQ) return [];
|
|
1853
|
+
|
|
1854
|
+
//
|
|
1871
1855
|
const _oparams: any[] = fetchFuncMethodParams || [];
|
|
1872
1856
|
const _params: any[] = _oparams.map((item: any) => item !== '$QUERY_STRING' ? item : (MANUAL_REQ ? QUERY_STRING_PLACEHOLDER : ''));
|
|
1873
1857
|
const res = await fetchData((_params).join(','), finalRes(inputVal), inputVal);
|
|
@@ -1905,6 +1889,11 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1905
1889
|
// Fixed an out-of-focus issue
|
|
1906
1890
|
fixFocusStatus();
|
|
1907
1891
|
|
|
1892
|
+
// Every time the input changes or the search button is clicked, a data request will be triggered
|
|
1893
|
+
if (MANUAL_REQ && val !== '') {
|
|
1894
|
+
popwinPosInit();
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1908
1897
|
|
|
1909
1898
|
}
|
|
1910
1899
|
|
|
@@ -1913,10 +1902,6 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1913
1902
|
|
|
1914
1903
|
rootRef.current?.classList.add('focus');
|
|
1915
1904
|
|
|
1916
|
-
// update temporary value
|
|
1917
|
-
setControlTempValue('');
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
1905
|
//
|
|
1921
1906
|
onFocus?.(selectInputRef.current);
|
|
1922
1907
|
|
|
@@ -1924,6 +1909,10 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
1924
1909
|
|
|
1925
1910
|
function handleBlur(event: any) {
|
|
1926
1911
|
|
|
1912
|
+
// Set the out-of-focus marker
|
|
1913
|
+
isBlurringRef.current = true;
|
|
1914
|
+
|
|
1915
|
+
|
|
1927
1916
|
// Fix the focus issue with using the "Tabs" and "Enter" keys
|
|
1928
1917
|
//
|
|
1929
1918
|
//
|
|
@@ -2346,6 +2335,9 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
2346
2335
|
{MANUAL_REQ ? <>
|
|
2347
2336
|
<span className="custom-select-multi__control-searchbtn">
|
|
2348
2337
|
<button tabIndex={-1} type="button" className="btn border-end-0 rounded-pill" onClick={(e: React.MouseEvent) => {
|
|
2338
|
+
e.preventDefault();
|
|
2339
|
+
e.stopPropagation();
|
|
2340
|
+
|
|
2349
2341
|
handleFetch().then((response: any) => {
|
|
2350
2342
|
|
|
2351
2343
|
// pop win initalization
|
|
@@ -2354,6 +2346,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
2354
2346
|
popwinFilterItems(controlTempValue);
|
|
2355
2347
|
}, 0);
|
|
2356
2348
|
});
|
|
2349
|
+
|
|
2357
2350
|
}}>
|
|
2358
2351
|
<svg width="1em" height="1em" fill="#a5a5a5" viewBox="0 0 16 16">
|
|
2359
2352
|
<path d="M12.027 9.92L16 13.95 14 16l-4.075-3.976A6.465 6.465 0 0 1 6.5 13C2.91 13 0 10.083 0 6.5 0 2.91 2.917 0 6.5 0 10.09 0 13 2.917 13 6.5a6.463 6.463 0 0 1-.973 3.42zM1.997 6.452c0 2.48 2.014 4.5 4.5 4.5 2.48 0 4.5-2.015 4.5-4.5 0-2.48-2.015-4.5-4.5-4.5-2.48 0-4.5 2.014-4.5 4.5z" fillRule="evenodd" />
|
|
@@ -2378,9 +2371,14 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
2378
2371
|
{MULTI_SEL_VALID ? <div ref={rootMultiRef} className="custom-select-multi__inputplaceholder-wrapper">
|
|
2379
2372
|
|
|
2380
2373
|
|
|
2374
|
+
|
|
2381
2375
|
{/* PLACEHOLDER */}
|
|
2382
2376
|
<div className="custom-select-multi__inputplaceholder-inner">
|
|
2383
|
-
<div style={MULTI_SEL_ENTIRE_AREA_TRIGGER ? {pointerEvents: 'auto', cursor: 'pointer'} : undefined} onClick={
|
|
2377
|
+
<div style={MULTI_SEL_ENTIRE_AREA_TRIGGER ? {pointerEvents: 'auto', cursor: 'pointer'} : undefined} onClick={(e: React.MouseEvent) => {
|
|
2378
|
+
if (MULTI_SEL_ENTIRE_AREA_TRIGGER) {
|
|
2379
|
+
if (typeof readOnly === 'undefined' || !readOnly) handleShowList();
|
|
2380
|
+
}
|
|
2381
|
+
}}>
|
|
2384
2382
|
<ul className="custom-select-multi__list">
|
|
2385
2383
|
|
|
2386
2384
|
{typeof multiSelectSelectedItemOnlyStatus !== 'undefined' ? <>
|
|
@@ -2611,6 +2609,9 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
2611
2609
|
{MANUAL_REQ ? <>
|
|
2612
2610
|
<span className="custom-select-multi__control-searchbtn">
|
|
2613
2611
|
<button tabIndex={-1} type="button" className="btn border-end-0 rounded-pill" onClick={(e: React.MouseEvent) => {
|
|
2612
|
+
e.preventDefault();
|
|
2613
|
+
e.stopPropagation();
|
|
2614
|
+
|
|
2614
2615
|
handleFetch().then((response: any) => {
|
|
2615
2616
|
|
|
2616
2617
|
// pop win initalization
|
|
@@ -2712,7 +2713,7 @@ const Select = forwardRef((props: SelectProps, externalRef: any) => {
|
|
|
2712
2713
|
|
|
2713
2714
|
// (2) Every time the input changes or the search button is clicked, a data request will be triggered
|
|
2714
2715
|
(fetchUpdate && !filterItemsHasNoMatchData && controlTempValue !== '')
|
|
2715
|
-
? <><div className="cus-select-loader">{loader || <svg height="12px" width="12px" viewBox="0 0 512 512"><g><path fill="inherit" d="M256,0c-23.357,0-42.297,18.932-42.297,42.288c0,23.358,18.94,42.288,42.297,42.288c23.357,0,42.279-18.93,42.279-42.288C298.279,18.932,279.357,0,256,0z" /><path fill="inherit" d="M256,427.424c-23.357,0-42.297,18.931-42.297,42.288C213.703,493.07,232.643,512,256,512c23.357,0,42.279-18.93,42.279-42.288C298.279,446.355,279.357,427.424,256,427.424z" /><path fill="inherit" d="M74.974,74.983c-16.52,16.511-16.52,43.286,0,59.806c16.52,16.52,43.287,16.52,59.806,0c16.52-16.511,16.52-43.286,0-59.806C118.261,58.463,91.494,58.463,74.974,74.983z" /><path fill="inherit" d="M377.203,377.211c-16.503,16.52-16.503,43.296,0,59.815c16.519,16.52,43.304,16.52,59.806,0c16.52-16.51,16.52-43.295,0-59.815C420.489,360.692,393.722,360.7,377.203,377.211z" /><path fill="inherit" d="M84.567,256c0.018-23.348-18.922-42.279-42.279-42.279c-23.357-0.009-42.297,18.932-42.279,42.288c-0.018,23.348,18.904,42.279,42.279,42.279C65.645,298.288,84.567,279.358,84.567,256z" /><path fill="inherit" d="M469.712,213.712c-23.357,0-42.279,18.941-42.297,42.288c0,23.358,18.94,42.288,42.297,42.297c23.357,0,42.297-18.94,42.279-42.297C512.009,232.652,493.069,213.712,469.712,213.712z" /><path fill="inherit" d="M74.991,377.22c-16.519,16.511-16.519,43.296,0,59.806c16.503,16.52,43.27,16.52,59.789,0c16.52-16.519,16.52-43.295,0-59.815C118.278,360.692,91.511,360.692,74.991,377.22z" /><path fill="inherit" d="M437.026,134.798c16.52-16.52,16.52-43.304,0-59.824c-16.519-16.511-43.304-16.52-59.823,0c-16.52,16.52-16.503,43.295,0,59.815C393.722,151.309,420.507,151.309,437.026,134.798z" /></g></svg>}</div></> : <>{fetchNoneInfo
|
|
2716
|
+
? <><div className="cus-select-loader">{loader || <svg height="12px" width="12px" viewBox="0 0 512 512"><g><path fill="inherit" d="M256,0c-23.357,0-42.297,18.932-42.297,42.288c0,23.358,18.94,42.288,42.297,42.288c23.357,0,42.279-18.93,42.279-42.288C298.279,18.932,279.357,0,256,0z" /><path fill="inherit" d="M256,427.424c-23.357,0-42.297,18.931-42.297,42.288C213.703,493.07,232.643,512,256,512c23.357,0,42.279-18.93,42.279-42.288C298.279,446.355,279.357,427.424,256,427.424z" /><path fill="inherit" d="M74.974,74.983c-16.52,16.511-16.52,43.286,0,59.806c16.52,16.52,43.287,16.52,59.806,0c16.52-16.511,16.52-43.286,0-59.806C118.261,58.463,91.494,58.463,74.974,74.983z" /><path fill="inherit" d="M377.203,377.211c-16.503,16.52-16.503,43.296,0,59.815c16.519,16.52,43.304,16.52,59.806,0c16.52-16.51,16.52-43.295,0-59.815C420.489,360.692,393.722,360.7,377.203,377.211z" /><path fill="inherit" d="M84.567,256c0.018-23.348-18.922-42.279-42.279-42.279c-23.357-0.009-42.297,18.932-42.279,42.288c-0.018,23.348,18.904,42.279,42.279,42.279C65.645,298.288,84.567,279.358,84.567,256z" /><path fill="inherit" d="M469.712,213.712c-23.357,0-42.279,18.941-42.297,42.288c0,23.358,18.94,42.288,42.297,42.297c23.357,0,42.297-18.94,42.279-42.297C512.009,232.652,493.069,213.712,469.712,213.712z" /><path fill="inherit" d="M74.991,377.22c-16.519,16.511-16.519,43.296,0,59.806c16.503,16.52,43.27,16.52,59.789,0c16.52-16.519,16.52-43.295,0-59.815C118.278,360.692,91.511,360.692,74.991,377.22z" /><path fill="inherit" d="M437.026,134.798c16.52-16.52,16.52-43.304,0-59.824c-16.519-16.511-43.304-16.52-59.823,0c-16.52,16.52-16.503,43.295,0,59.815C393.722,151.309,420.507,151.309,437.026,134.798z" /></g></svg>}</div></> : <>{fetchNoneInfo}</>}
|
|
2716
2717
|
</button>
|
|
2717
2718
|
{/* /NO MATCH & LOADER */}
|
|
2718
2719
|
|
|
@@ -7,6 +7,7 @@ import { clsWrite, combinedCls } from 'funda-utils/dist/cjs/cls';
|
|
|
7
7
|
import { actualPropertyValue, getTextTop } from 'funda-utils/dist/cjs/inputsCalculation';
|
|
8
8
|
import useDebounce from 'funda-utils/dist/cjs/useDebounce';
|
|
9
9
|
|
|
10
|
+
|
|
10
11
|
export type TextareaProps = {
|
|
11
12
|
contentRef?: React.ForwardedRef<any>; // could use "Array" on contentRef.current, such as contentRef.current[0], contentRef.current[1]
|
|
12
13
|
wrapperClassName?: string;
|
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.161",
|
|
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",
|