You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey all! Anyone know how to support percentage/suffix? aka always showing a character like % whenever there's input regardless of length? The closest I got was this, but I feel like there could be a simpler way I'm missing:
mask: [
{ mask: "0%" },
{
mask: "#0%",
definitions: {
"#": /[1-9]/
}
},
{
mask: "#00%",
definitions: {
"#": /[1]/
}
}
],
prepare: (value) => value + "a", // hack to show % after del or weird input
eager: true
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all! Anyone know how to support percentage/suffix? aka always showing a character like
%whenever there's input regardless of length? The closest I got was this, but I feel like there could be a simpler way I'm missing:Beta Was this translation helpful? Give feedback.
All reactions