简体   繁体   English

如果有值但如果 defaultValue 没有数据显示但可编辑,则 REACT Antd 输入字段不可编辑

[英]REACT Antd input field is not editable if has value but if defaultValue no data is showing but editable

If I use value in input field data will show up but field is not editable如果我在输入字段数据中使用值将显示但字段不可编辑在此处输入图像描述 在此处输入图像描述

But if I use defaultValue no data is showing but field is editable但是如果我使用 defaultValue 没有数据显示但字段是可编辑的在此处输入图像描述 在此处输入图像描述

heres getting the value of the input field if it has changes如果输入字段有变化,继承人获取输入字段的值在此处输入图像描述

I dont get it yet why it is behaving like that.我还不明白为什么它会这样。 I need to show the data in the field at the same time make it editable so that any changes added in the field it will be saved我需要同时在字段中显示数据使其可编辑,以便在字段中添加的任何更改都将被保存

If I use value in input field data will show up but field is not editable如果我在输入字段数据中使用值将显示但字段不可编辑在此处输入图像描述 在此处输入图像描述

But if I use defaultValue no data is showing but field is editable但是如果我使用 defaultValue 没有数据显示但字段是可编辑的在此处输入图像描述 在此处输入图像描述

heres getting the value of the input field if it has changes如果输入字段有变化,继承人获取输入字段的值在此处输入图像描述

I dont get it yet why it is behaving like that.我还不明白为什么它会这样。 I need to show the data in the field at the same time make it editable so that any changes added in the field it will be saved我需要同时在字段中显示数据使其可编辑,以便在字段中添加的任何更改都将被保存

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM