Add option to allow spaces
See original GitHub issueI ran across a situation where I needed to allow spaces inside a Cleave field (in React) but spaces are disallowed by default. An allowSpaces
option would be really helpful. I worked around it by adding this to the options for that field:
blocks: [99999],
delimiter: ''
However, an allowSpaces
option would have been quite helpful. Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:18
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How do I put a space character before option text in ...
Press ALT and type 0160 on your numeric keypad, so it should be something like ALT+0160 . It will add a space. ListItem("ALT+0160...
Read more >Create or delete a space grouped by topic in Google Chat
The option to create spaces that allow guests is only available on Google Workspace accounts. Tap Advanced Drop-down arrow and then ...
Read more >Change the spaces between text
The idea is to give a better looking result by reducing the spacing between characters that fit together nicely (such as "A" and...
Read more >How whitespace is handled by HTML, CSS, and in the DOM
These characters allow you to format your code in a way that will make it easily readable by yourself and other people. In...
Read more >Assign space permissions | Confluence Cloud
Select an Edit Permissions button (under Groups, Individual Users, or Anonymous Access). To add a new individual user to your space: Go to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a component that sometimes needs formatted input and sometimes just needs to be an input field and I don’t want to put logic in to swap out the field. I ended up using @jdsteinbach’s solution.
Space is the default delimiter, but it only takes effect when a format type option is specified, e.g. numeral, phone, blocks, etc… I think in your case, none of those type actually applies, so just to passing an empty option object can actually prevent format happening, which allows any space entering, and this feels like a more intuitive way for me. While your workarounds also works 👍