Allow for setting cursor location in TextInput #1507
Derrreks
started this conversation in
Feature requests
Replies: 1 comment
-
|
TextInput renders regular input element, you can perform any actions as you would do with a regular input element |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have some custom input components that wrap Mantine's
TextInput- for instance, a component that formats/better renders a phone number as the user types it in (adding parens and dashes in the right places). However, when we rewrite theinput's value it resets the cursor to the end, leaving a weird experience if a user tries to edit the middle.On a base HTML
inputcomponent, one might solve this using thesetSelectionRangefunction (docs). From my reading of the Mantine docs, it does not seem possible to use this or any similar alternative withTextInput.Am I mistaken and this is possible? Alternatively, might this be an interesting addition to Mantine?
Beta Was this translation helpful? Give feedback.
All reactions