I want to update the value in textbox control in reactJS SPFX webpart.
But when i am trying to modify its in readonly mode.
How can we edit the textbox control.
My code:
=======================================================
import*asReact
from'react';
importstylesfrom'./Edt.module.scss';
import { IEdtProps }from'./IEdtProps';
import { escape }from'@microsoft/sp-lodash-subset';
exportinterfaceIEdtState{
"descriptionName":""
}
exportdefaultclassEdt
extendsReact.Component<IEdtProps,IEdtState> {
publicconstructor(props:IEdtProps, state:IEdtState){
super(props);
varself =this;
this.state = {
descriptionName:""
};
}
publicOnchangeBuilding(event:any): void {
this.setState({descriptionName:event.target.value });
//alert(this.state.descriptionName);
}
publicrender():JSX.Element {
return (
<div>
<inputtype="text"value= "Raj"onChange={this.OnchangeBuilding.bind(this)}/>
</div>
);
}
}
====================================================
UI:
====================================
======================================
I am not able to modify the text in above control