react-table-edit 1.2.39 → 1.2.40
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 +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -679,7 +679,7 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
679
679
|
};
|
|
680
680
|
const handChange = (val) => {
|
|
681
681
|
if (val && val.isCreated) {
|
|
682
|
-
options.push({ ...val, label: val.value, isCreated: void 0 });
|
|
682
|
+
options.push({ ...val, [fieldLabel ?? "label"]: val.value, isCreated: void 0 });
|
|
683
683
|
}
|
|
684
684
|
onChange(val);
|
|
685
685
|
};
|
|
@@ -890,7 +890,7 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
890
890
|
};
|
|
891
891
|
(0, import_react6.useEffect)(() => {
|
|
892
892
|
if ((optionsLoad?.length ?? 0) === 0 && allowCreate && !isMulti && searchTerm) {
|
|
893
|
-
setOptionsLoad([{ label: `Create "${searchTerm}"`, value: searchTerm, isCreated: true }]);
|
|
893
|
+
setOptionsLoad([{ [fieldLabel ?? "label"]: `Create "${searchTerm}"`, [fieldValue ?? "value"]: searchTerm, isCreated: true }]);
|
|
894
894
|
}
|
|
895
895
|
}, [optionsLoad]);
|
|
896
896
|
(0, import_react6.useEffect)(() => {
|
package/dist/index.mjs
CHANGED
|
@@ -641,7 +641,7 @@ var SelectTable = forwardRef((props, ref) => {
|
|
|
641
641
|
};
|
|
642
642
|
const handChange = (val) => {
|
|
643
643
|
if (val && val.isCreated) {
|
|
644
|
-
options.push({ ...val, label: val.value, isCreated: void 0 });
|
|
644
|
+
options.push({ ...val, [fieldLabel ?? "label"]: val.value, isCreated: void 0 });
|
|
645
645
|
}
|
|
646
646
|
onChange(val);
|
|
647
647
|
};
|
|
@@ -852,7 +852,7 @@ var SelectTable = forwardRef((props, ref) => {
|
|
|
852
852
|
};
|
|
853
853
|
useEffect3(() => {
|
|
854
854
|
if ((optionsLoad?.length ?? 0) === 0 && allowCreate && !isMulti && searchTerm) {
|
|
855
|
-
setOptionsLoad([{ label: `Create "${searchTerm}"`, value: searchTerm, isCreated: true }]);
|
|
855
|
+
setOptionsLoad([{ [fieldLabel ?? "label"]: `Create "${searchTerm}"`, [fieldValue ?? "value"]: searchTerm, isCreated: true }]);
|
|
856
856
|
}
|
|
857
857
|
}, [optionsLoad]);
|
|
858
858
|
useEffect3(() => {
|