Open davidrhoderick opened 4 years ago
It's quite confusing but the name from v2 is: beforeMaskedValueChange
beforeMaskedValueChange.
Its not working for me either.
I haven't found a replacement library yet lol so here's the basic callback signature if anyone needs it:
// incomingValue refers to the raw value being added to the input
const beforeMaskedValueChange = (previousState, currentState, incomingValue, mask) => {
// Return value needs to have at least this shape:
return { value: null, selection: { start: null, end: null } };
};
I'm using react 16.6.1 and input mask 2.0.4 and when I just copy and past the beforeMaskStateChange demo code from the tutorial to my project, nothing happens. Is the function working correctly? Do I need to upgrade my versions?