@hzab/list-render 1.10.8 → 1.10.9
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -181,7 +181,10 @@ export const useEditTable = (props) => {
|
|
|
181
181
|
|
|
182
182
|
useEffect(() => {
|
|
183
183
|
if (editingId || editingKey) {
|
|
184
|
-
|
|
184
|
+
try {
|
|
185
|
+
// HACK: try catch 解决 select 等表单项 focus 报错问题
|
|
186
|
+
editingFiledRef.current?.current?.focus?.();
|
|
187
|
+
} catch (error) {}
|
|
185
188
|
}
|
|
186
189
|
}, [editingId, editingKey]);
|
|
187
190
|
|
|
@@ -212,7 +215,7 @@ export const useEditTable = (props) => {
|
|
|
212
215
|
try {
|
|
213
216
|
// 点击保存,数据抛出
|
|
214
217
|
(await formRender?.validate()) as Item;
|
|
215
|
-
onEditSubmit && await onEditSubmit(formRender.values);
|
|
218
|
+
onEditSubmit && (await onEditSubmit(formRender.values));
|
|
216
219
|
// 清除编辑目标
|
|
217
220
|
setEditingId("");
|
|
218
221
|
setEditingKey("");
|