I'm working in a React JS/Typescript project and I need to build a porcentage mask in a input. I tried using regex but didn't work. My goal is to as soon as the input value is set it's dynamically put a percentage sign (%) at the end of my value. It'd be perfect if it's let me put commas as well (45,50%) but is not really necessary.
examples: 10% 100% 20% 45%