fix(agent): correctly use initForm instead of form for description tag clicks
parent
3d46372688
commit
a77affbd0e
|
|
@ -839,10 +839,8 @@ export default function AgentEditor() {
|
|||
<span
|
||||
key={label}
|
||||
onClick={() => {
|
||||
// 这里需要通知表单重新渲染
|
||||
form.setFieldsValue({ description: label });
|
||||
// 为了确保组件感知到变化,强制触发一下更新(如果表单没有响应)
|
||||
form.validateFields(['description']);
|
||||
// 给 initForm 赋值(因为第一步向导是 initForm,不是主页面的 form)
|
||||
initForm.setFieldsValue({ description: label });
|
||||
}}
|
||||
style={{
|
||||
padding: '6px 10px',
|
||||
|
|
|
|||
Loading…
Reference in New Issue