react-table-edit 0.1.4 → 0.1.6
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 +16 -6
- package/dist/index.mjs +16 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -103,7 +103,7 @@ var messageHtmlBoxConfirm = (t, message, handle, data, title = "Important", btnO
|
|
|
103
103
|
cancelButtonText: t(btnCancel),
|
|
104
104
|
customClass: {
|
|
105
105
|
confirmButton: "btn btn-primary",
|
|
106
|
-
cancelButton: "btn btn-danger ms-1"
|
|
106
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
107
107
|
},
|
|
108
108
|
buttonsStyling: false
|
|
109
109
|
}).then(async (result) => {
|
|
@@ -124,7 +124,7 @@ var messageHtmlBoxError = (t, message, title = "Important", btnCancel = "Ok") =>
|
|
|
124
124
|
cancelButtonText: t(btnCancel),
|
|
125
125
|
width: "auto",
|
|
126
126
|
customClass: {
|
|
127
|
-
cancelButton: "btn btn-danger ms-1"
|
|
127
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
128
128
|
},
|
|
129
129
|
buttonsStyling: false
|
|
130
130
|
});
|
|
@@ -139,7 +139,7 @@ var messageBoxConfirmDelete = (t, handle, data) => {
|
|
|
139
139
|
cancelButtonText: t("Cancel"),
|
|
140
140
|
customClass: {
|
|
141
141
|
confirmButton: "btn btn-primary",
|
|
142
|
-
cancelButton: "btn btn-danger ms-1"
|
|
142
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
143
143
|
},
|
|
144
144
|
buttonsStyling: false
|
|
145
145
|
}).then(async (result) => {
|
|
@@ -158,7 +158,7 @@ var messageBoxConfirm = (t, handle, data, message, title = "Important", btnOk =
|
|
|
158
158
|
cancelButtonText: t(btnCancel),
|
|
159
159
|
customClass: {
|
|
160
160
|
confirmButton: "btn btn-primary",
|
|
161
|
-
cancelButton: "btn btn-danger ms-1"
|
|
161
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
162
162
|
},
|
|
163
163
|
buttonsStyling: false
|
|
164
164
|
}).then(async (result) => {
|
|
@@ -176,7 +176,7 @@ var messageBoxError = (t, message, title = "Important", btnCancel = "Ok") => {
|
|
|
176
176
|
showConfirmButton: false,
|
|
177
177
|
cancelButtonText: t(btnCancel),
|
|
178
178
|
customClass: {
|
|
179
|
-
cancelButton: "btn btn-danger ms-1"
|
|
179
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
180
180
|
},
|
|
181
181
|
buttonsStyling: false
|
|
182
182
|
});
|
|
@@ -208,7 +208,7 @@ var messageBoxConfirm2 = async (t, data, data2, message) => {
|
|
|
208
208
|
cancelButtonText: t("Cancel"),
|
|
209
209
|
customClass: {
|
|
210
210
|
confirmButton: "btn btn-primary",
|
|
211
|
-
cancelButton: "btn btn-danger ms-1"
|
|
211
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
212
212
|
},
|
|
213
213
|
buttonsStyling: false
|
|
214
214
|
}).then((result) => {
|
|
@@ -1417,6 +1417,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
|
|
|
1417
1417
|
duplicateDisable,
|
|
1418
1418
|
decimalSeparator = ",",
|
|
1419
1419
|
thousandSeparator = ".",
|
|
1420
|
+
handleSelect,
|
|
1420
1421
|
isMulti
|
|
1421
1422
|
} = props;
|
|
1422
1423
|
(0, import_react12.useImperativeHandle)(ref, () => {
|
|
@@ -2228,14 +2229,23 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
|
|
|
2228
2229
|
if (isMulti) {
|
|
2229
2230
|
if (dataSource && selectedRows && selectedRows?.length !== selectedItem?.length) {
|
|
2230
2231
|
setSelectedItem([...selectedRows]);
|
|
2232
|
+
if (handleSelect) {
|
|
2233
|
+
handleSelect([...selectedRows]);
|
|
2234
|
+
}
|
|
2231
2235
|
}
|
|
2232
2236
|
} else {
|
|
2233
2237
|
if (dataSource && selectedRows?.length > 0) {
|
|
2234
2238
|
if (!selectedItem || selectedItem[fieldKey] !== selectedRows[0][fieldKey]) {
|
|
2235
2239
|
setSelectedItem({ ...selectedRows[0] });
|
|
2240
|
+
if (handleSelect) {
|
|
2241
|
+
handleSelect({ ...selectedRows[0] });
|
|
2242
|
+
}
|
|
2236
2243
|
}
|
|
2237
2244
|
} else {
|
|
2238
2245
|
setSelectedItem(void 0);
|
|
2246
|
+
if (handleSelect) {
|
|
2247
|
+
handleSelect(void 0);
|
|
2248
|
+
}
|
|
2239
2249
|
}
|
|
2240
2250
|
}
|
|
2241
2251
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -59,7 +59,7 @@ var messageHtmlBoxConfirm = (t, message, handle, data, title = "Important", btnO
|
|
|
59
59
|
cancelButtonText: t(btnCancel),
|
|
60
60
|
customClass: {
|
|
61
61
|
confirmButton: "btn btn-primary",
|
|
62
|
-
cancelButton: "btn btn-danger ms-1"
|
|
62
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
63
63
|
},
|
|
64
64
|
buttonsStyling: false
|
|
65
65
|
}).then(async (result) => {
|
|
@@ -80,7 +80,7 @@ var messageHtmlBoxError = (t, message, title = "Important", btnCancel = "Ok") =>
|
|
|
80
80
|
cancelButtonText: t(btnCancel),
|
|
81
81
|
width: "auto",
|
|
82
82
|
customClass: {
|
|
83
|
-
cancelButton: "btn btn-danger ms-1"
|
|
83
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
84
84
|
},
|
|
85
85
|
buttonsStyling: false
|
|
86
86
|
});
|
|
@@ -95,7 +95,7 @@ var messageBoxConfirmDelete = (t, handle, data) => {
|
|
|
95
95
|
cancelButtonText: t("Cancel"),
|
|
96
96
|
customClass: {
|
|
97
97
|
confirmButton: "btn btn-primary",
|
|
98
|
-
cancelButton: "btn btn-danger ms-1"
|
|
98
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
99
99
|
},
|
|
100
100
|
buttonsStyling: false
|
|
101
101
|
}).then(async (result) => {
|
|
@@ -114,7 +114,7 @@ var messageBoxConfirm = (t, handle, data, message, title = "Important", btnOk =
|
|
|
114
114
|
cancelButtonText: t(btnCancel),
|
|
115
115
|
customClass: {
|
|
116
116
|
confirmButton: "btn btn-primary",
|
|
117
|
-
cancelButton: "btn btn-danger ms-1"
|
|
117
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
118
118
|
},
|
|
119
119
|
buttonsStyling: false
|
|
120
120
|
}).then(async (result) => {
|
|
@@ -132,7 +132,7 @@ var messageBoxError = (t, message, title = "Important", btnCancel = "Ok") => {
|
|
|
132
132
|
showConfirmButton: false,
|
|
133
133
|
cancelButtonText: t(btnCancel),
|
|
134
134
|
customClass: {
|
|
135
|
-
cancelButton: "btn btn-danger ms-1"
|
|
135
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
136
136
|
},
|
|
137
137
|
buttonsStyling: false
|
|
138
138
|
});
|
|
@@ -164,7 +164,7 @@ var messageBoxConfirm2 = async (t, data, data2, message) => {
|
|
|
164
164
|
cancelButtonText: t("Cancel"),
|
|
165
165
|
customClass: {
|
|
166
166
|
confirmButton: "btn btn-primary",
|
|
167
|
-
cancelButton: "btn btn-danger ms-1"
|
|
167
|
+
cancelButton: "btn btn-outline-danger ms-1"
|
|
168
168
|
},
|
|
169
169
|
buttonsStyling: false
|
|
170
170
|
}).then((result) => {
|
|
@@ -1391,6 +1391,7 @@ var TableEdit = forwardRef2((props, ref) => {
|
|
|
1391
1391
|
duplicateDisable,
|
|
1392
1392
|
decimalSeparator = ",",
|
|
1393
1393
|
thousandSeparator = ".",
|
|
1394
|
+
handleSelect,
|
|
1394
1395
|
isMulti
|
|
1395
1396
|
} = props;
|
|
1396
1397
|
useImperativeHandle(ref, () => {
|
|
@@ -2202,14 +2203,23 @@ var TableEdit = forwardRef2((props, ref) => {
|
|
|
2202
2203
|
if (isMulti) {
|
|
2203
2204
|
if (dataSource && selectedRows && selectedRows?.length !== selectedItem?.length) {
|
|
2204
2205
|
setSelectedItem([...selectedRows]);
|
|
2206
|
+
if (handleSelect) {
|
|
2207
|
+
handleSelect([...selectedRows]);
|
|
2208
|
+
}
|
|
2205
2209
|
}
|
|
2206
2210
|
} else {
|
|
2207
2211
|
if (dataSource && selectedRows?.length > 0) {
|
|
2208
2212
|
if (!selectedItem || selectedItem[fieldKey] !== selectedRows[0][fieldKey]) {
|
|
2209
2213
|
setSelectedItem({ ...selectedRows[0] });
|
|
2214
|
+
if (handleSelect) {
|
|
2215
|
+
handleSelect({ ...selectedRows[0] });
|
|
2216
|
+
}
|
|
2210
2217
|
}
|
|
2211
2218
|
} else {
|
|
2212
2219
|
setSelectedItem(void 0);
|
|
2220
|
+
if (handleSelect) {
|
|
2221
|
+
handleSelect(void 0);
|
|
2222
|
+
}
|
|
2213
2223
|
}
|
|
2214
2224
|
}
|
|
2215
2225
|
}
|