<div>
<TextField
value={this.state.Budget}
onChanged={this.onChangeBudget}
/>
</div>
public onChangeBudget = (value: string) =>
{
console.log("Budget : " + value);
console.log(value.replace(/\B(?=(\d{3})+(?!\d))/g, ','));
let abc = value.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return this.setState({ Budget: abc });
}
So the issue is when i am logging the value of a its showing correct result(1,111,111,111) but when i am doing the setState for the same it is show like this (1,1,1,1,1,1,1,1,111).Please suggest where am i going wrong.
required output is- 1,000 10,000 100,000 1,000,000 10,000,000 100,000,000 1,000,0000,000