react-countup
react-countup copied to clipboard
separator is not working
<CountUp className="CountUp"
suffix="+"
separator=" "
decimals={4}
decimal=","
start={0} end={total}/>
//Result: 912800,0000+
//Expected: 912 800,0000+
Hey!
separator only works with useGrouping:
<CountUp className="CountUp"
useGrouping
suffix="+"
separator=" "
decimals={4}
decimal=","
start={0} end={total}/>
See a live example here https://codesandbox.io/s/lrpz51mk9
👍 Thanks. It's working now :)
But I think when separator is not empty, component CoutuUp will auto detect useGrouping
Yeah seems like a good idea to add this behaviour. Would you mind to open a PR?
PS: if you set useGrouping only, a default value of separator will be used.