react-table-edit 1.1.8 → 1.2.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.js +5 -2
- package/dist/index.mjs +5 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -863,6 +863,11 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
863
863
|
setIsLoading(false);
|
|
864
864
|
setOptionsLoad(rs);
|
|
865
865
|
};
|
|
866
|
+
(0, import_react6.useEffect)(() => {
|
|
867
|
+
if (!searchTerm) {
|
|
868
|
+
setOptionsLoad(void 0);
|
|
869
|
+
}
|
|
870
|
+
}, [searchTerm]);
|
|
866
871
|
const checkOverflow = (indexRow, indexCol) => {
|
|
867
872
|
const element = document.getElementById(`select-${id}-${indexRow}-${indexCol}`);
|
|
868
873
|
return element && element.scrollWidth > element.clientWidth;
|
|
@@ -1097,8 +1102,6 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
1097
1102
|
setOptionsLoad(arr);
|
|
1098
1103
|
}, 500);
|
|
1099
1104
|
}
|
|
1100
|
-
} else {
|
|
1101
|
-
loadOptions(void 0);
|
|
1102
1105
|
}
|
|
1103
1106
|
setSearchTerm(val.target.value);
|
|
1104
1107
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -824,6 +824,11 @@ var SelectTable = forwardRef((props, ref) => {
|
|
|
824
824
|
setIsLoading(false);
|
|
825
825
|
setOptionsLoad(rs);
|
|
826
826
|
};
|
|
827
|
+
useEffect3(() => {
|
|
828
|
+
if (!searchTerm) {
|
|
829
|
+
setOptionsLoad(void 0);
|
|
830
|
+
}
|
|
831
|
+
}, [searchTerm]);
|
|
827
832
|
const checkOverflow = (indexRow, indexCol) => {
|
|
828
833
|
const element = document.getElementById(`select-${id}-${indexRow}-${indexCol}`);
|
|
829
834
|
return element && element.scrollWidth > element.clientWidth;
|
|
@@ -1058,8 +1063,6 @@ var SelectTable = forwardRef((props, ref) => {
|
|
|
1058
1063
|
setOptionsLoad(arr);
|
|
1059
1064
|
}, 500);
|
|
1060
1065
|
}
|
|
1061
|
-
} else {
|
|
1062
|
-
loadOptions(void 0);
|
|
1063
1066
|
}
|
|
1064
1067
|
setSearchTerm(val.target.value);
|
|
1065
1068
|
},
|