react-table-edit 1.2.38 → 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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
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)(() => {
|
|
@@ -3196,6 +3196,7 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
3196
3196
|
maxHeight: col.selectSettings?.heightPopup ? Number(col.selectSettings?.heightPopup) : void 0,
|
|
3197
3197
|
menuWidth: col.selectSettings?.widthPopup ? Number(col.selectSettings?.widthPopup) : void 0,
|
|
3198
3198
|
textAlign: col.textAlign ?? "left",
|
|
3199
|
+
allowCreate: col.selectSettings?.allowCreate,
|
|
3199
3200
|
onKeyDown: (e) => {
|
|
3200
3201
|
if (checkKeyDown(e, row, col, indexRow + 1, indexCol + 1)) {
|
|
3201
3202
|
}
|
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(() => {
|
|
@@ -3166,6 +3166,7 @@ var TableEdit = forwardRef4((props, ref) => {
|
|
|
3166
3166
|
maxHeight: col.selectSettings?.heightPopup ? Number(col.selectSettings?.heightPopup) : void 0,
|
|
3167
3167
|
menuWidth: col.selectSettings?.widthPopup ? Number(col.selectSettings?.widthPopup) : void 0,
|
|
3168
3168
|
textAlign: col.textAlign ?? "left",
|
|
3169
|
+
allowCreate: col.selectSettings?.allowCreate,
|
|
3169
3170
|
onKeyDown: (e) => {
|
|
3170
3171
|
if (checkKeyDown(e, row, col, indexRow + 1, indexCol + 1)) {
|
|
3171
3172
|
}
|