I'm trying to add Thousand separator to my mui-textField value,knowing that i already made digit separation.my code looks like this:
<TextField
size='small'
label='Total Cotisations Encaissées'
value={
totalEncaissement
?.toFixed(modeMO)
?.replace(/\d(?=(\d{3})+\.)/g, "$& ") || 0
}
variant='outlined'
fullWidth
type={"number"}
/>
</Grid>
The field doesn't dispay anything when i add replace, but works totally fine with toFixed only. Please could somebody help