I am getting this warning that I can not resolve:
Invalid value for prop
valueon tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details
The following is the code I am using:
<FormItem validateStatus={NameError ? "error" : ""} help={NameError || ""}>
{getFieldDecorator("Name", {
initialValue: (()=>{this.state.Data.Name}),
rules: [{ required: true, message: "Please input the component name!" }]
})(
<Input
className="form-control"
type="text"
name="Name"
defaultValue={this.state.Data.Name}
onChange={this.onChange}
/>
)}
</FormItem>
My typescript interfaces look like this:
export interface IFieldEdition{
Data:IFieldData
}
export interface IFieldData{
Id?:number,
Name?:string,
Value?:string,
Description?:string,
CreatedDate?:Date,
CreatedBy?:string,
StatusId?: number
}
How can I resolve this? Any clue?