We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.38.0
https://codesandbox.io/s/tdesign-react-demo-forked-jrkblb?file=/src/demo.jsx:406-431
点击页面【设置信息】按钮,【我的名字】字段没有出现error状态
1、点击页面【设置信息】按钮,【我的名字】字段可以出现error状态 2、期望支持可以设置message,如formRef.current.setFields?.([{ name: "myname", status: "fail", message: "我是自定义错误信息" }]);
【我的名字】字段没有出现error状态
React 17
No response
// demo 完整代码 import React, { useRef } from "react"; import { Form, Input, Radio, Checkbox, Button, MessagePlugin, DatePicker } from "tdesign-react";
const { FormItem } = Form;
export default function BaseForm() { const formRef = useRef();
const onSubmit = (e) => { console.log(e); if (e.validateResult === true) { MessagePlugin.info("提交成功"); } };
const setData = () => { formRef.current.setFields?.([{ name: "myname", status: "fail" }]); console.log("getFieldsValue all: ", formRef.current.getFieldsValue?.(true)); };
const onReset = (e) => { console.log(e); MessagePlugin.info("重置成功"); };
const onValuesChange = (value) => { console.log(value); };
return (
The text was updated successfully, but these errors were encountered:
👋 @liyongfen,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
♥️ 有劳 @ximendatie @cuijinyu @HQ-Lin @BaoTao1997 @yume316 尽快确认问题。 确认有效后将下一步计划和可能需要的时间回复给 @liyongfen 。
honkinglin
Successfully merging a pull request may close this issue.
tdesign-react 版本
0.38.0
重现链接
https://codesandbox.io/s/tdesign-react-demo-forked-jrkblb?file=/src/demo.jsx:406-431
重现步骤
点击页面【设置信息】按钮,【我的名字】字段没有出现error状态
期望结果
1、点击页面【设置信息】按钮,【我的名字】字段可以出现error状态
2、期望支持可以设置message,如formRef.current.setFields?.([{ name: "myname", status: "fail", message: "我是自定义错误信息" }]);
实际结果
【我的名字】字段没有出现error状态
框架版本
React 17
浏览器版本
No response
系统版本
No response
Node版本
No response
补充说明
// demo 完整代码
import React, { useRef } from "react";
import {
Form,
Input,
Radio,
Checkbox,
Button,
MessagePlugin,
DatePicker
} from "tdesign-react";
const { FormItem } = Form;
export default function BaseForm() {
const formRef = useRef();
const onSubmit = (e) => {
console.log(e);
if (e.validateResult === true) {
MessagePlugin.info("提交成功");
}
};
const setData = () => {
formRef.current.setFields?.([{ name: "myname", status: "fail" }]);
console.log("getFieldsValue all: ", formRef.current.getFieldsValue?.(true));
};
const onReset = (e) => {
console.log(e);
MessagePlugin.info("重置成功");
};
const onValuesChange = (value) => {
console.log(value);
};
return (
<FormItem style={{ marginLeft: 100 }}>
提交
<Button theme="primary" onClick={setData} style={{ marginLeft: 12 }}>
设置信息
<Button type="reset" style={{ marginLeft: 12 }}>
重置
);
}
The text was updated successfully, but these errors were encountered: