I have multiple date textfield with close button, on clicking on close(x) should delete the textfield, But not working,( remove the textfield on clicking on close button ) Here is my codelink https://codesandbox.io/s/strange-http-zhj4f
Better to code your map()
this way
{closedatearr.map(datevalue => {
return (
<div className="text-content" key={datevalue.toString()}>
<input type="text" value={datevalue} className="inputfield" readOnly />
<button
type="button"
onClick={() => this.textareaHandler(datevalue)}
>
X
</button>
</div>
);
})}