Closed utkarsh867 closed 1 year ago
I wanted to annotate data, but I wanted a dropdown instead of a text area.
I observed that it was not possible to change the text area without implementing the complete TextEditor component.
TextEditor
This change now allows me to provide a React Component as a prop.
<Annotation src={img} annotations={annotations} value={annotation} onChange={setCurrentAnnotation} onSubmit={onSubmit} renderInputArea={props => <LabelInputArea {...props} />} />
I have not written any tests yet.
@Secretmapper Your feedback will be much appreciated.
Use Case
I wanted to annotate data, but I wanted a dropdown instead of a text area.
I observed that it was not possible to change the text area without implementing the complete
TextEditor
component.This change now allows me to provide a React Component as a prop.
I have not written any tests yet.