Update PinInput.jsx remove focus from clear#212
Open
maxuapro wants to merge 1 commit intoarunghosh:masterfrom
Open
Update PinInput.jsx remove focus from clear#212maxuapro wants to merge 1 commit intoarunghosh:masterfrom
maxuapro wants to merge 1 commit intoarunghosh:masterfrom
Conversation
please remove focus from clear
Owner
|
Thank you for the contribution :) The idea behind the focus-on-clear was to set focus on the first element when the values are cleared. Any reason for removing it? |
Author
|
there is a reason. I use your code in combination with other inputs for
searching purposes, and the pin my user enters is used kinda like an id, so
I want to clear PinInput, cs there is no sense to search by id and
something else, right? But your current clear function also auto focuses on
itself.. which is not good in my case) I think people can easily use focus
function if they need it after clear. It just makes more sense. I already
fixed this in my own version of your code, but I still suggest you to
remove that auto focus feature..
…On Thu, Aug 24, 2023, 12:39 Arun Ghosh ***@***.***> wrote:
@maxuapro <https://github.com/maxuapro>
Thank you for the contribution :)
The idea behind the focus-on-clear was to set focus on the first element
when the values are cleared. Any reason for removing it?
—
Reply to this email directly, view it on GitHub
<#212 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASBANW7HAWGQVBZV7ESQ6RLXW4ONDANCNFSM6AAAAAA3YI4KIA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Owner
|
Thank you for the clarification. Your case makes sense. But not sure if it is good to change the existing behavior. I would rather do it via a prop like |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
please remove focus from clear