ProForm: onChange事件不触发
gssggssg opened this issue · 1 comments
gssggssg commented
描述错误
uiw admin 进行升级后 ProForm: onChange事件不触发
提供在线重现示例
测试代码
import React, { useState, useRef } from "react";
import ReactDOM from 'react-dom';
import { Form, Input, Row, Col, Slider, Button, Notify } from 'uiw';
function Demo() {
const form = useRef()
return (
<div>
<Form
ref={form}
onChange={({ initial, current }) => {
console.log('onChange', initial, current);
}}
onSubmit={({ initial, current }) => {
}}
fields={{
name: {
label: '姓名',
children: <Input placeholder="请输入姓名" />
},
}}
>
{({ fields, state, canSubmit }) => {
return (
<div>
<Row>
<Col style={{ maxWidth: 300 }}>{fields.name}</Col>
</Row>
<Row>
<Col>
<Button disabled={!canSubmit()} type="primary" htmlType="submit">提交</Button>
</Col>
</Row>
</div>
)
}}
</Form>
</div>
)
}
ReactDOM.render(<Demo />, _mount_);
预期行为
onChange事件能触发
截图
桌面(请填写以下信息):
- UIW:5.2.32](https://uiwjs.github.io/uiw-admin/#/)
- 操作系统:windows10
- 浏览器:Chrome
xingyuefeng commented
@gssggssg 更新uiw admin至最新版 已修复