Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add focuslock #45

Merged
merged 4 commits into from
Jul 8, 2024
Merged

Add focuslock #45

merged 4 commits into from
Jul 8, 2024

Conversation

elboletaire
Copy link
Member

Also trying to execute the callback on enter key, but for unknown reason it's not working :\

Also trying to execute the callback on enter key, but for unknown reason
it's not working :\
Copy link

github-actions bot commented Jul 5, 2024

@github-actions github-actions bot temporarily deployed to pull request July 5, 2024 09:58 Inactive
Copy link

github-actions bot commented Jul 5, 2024

@github-actions github-actions bot temporarily deployed to pull request July 5, 2024 09:58 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 5, 2024 10:59 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 5, 2024 10:59 Inactive
@selankon
Copy link
Collaborator

selankon commented Jul 5, 2024

Add a fix to make it working.

First of all the input Enter event doesn't need to be debounced (have to be immediate). On the other hand the problem was that the PopoverCallback was not passed down to the Input, is because that it didn't work.

By the way, I consider that the InputSearch doesn't need to implement the Enter event because the callback is supposed to be called onChange and after the debounce time. So the Enter key won't be pressed any time. Also this input could be used inside a form without the debounce time, and pressing enter could execute the "form submit".

So, the Enter callback is a particular feature only for the Popover (which has a "submit button" and the user may want to execute the search on "Enter"). I did the implementation here f1fb374

@selankon
Copy link
Collaborator

selankon commented Jul 5, 2024

Another question is if the popover have to be closed after Enter pressed

@selankon selankon marked this pull request as ready for review July 5, 2024 11:05
@github-actions github-actions bot temporarily deployed to pull request July 5, 2024 11:22 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 5, 2024 11:23 Inactive
@elboletaire
Copy link
Member Author

Another question is if the popover have to be closed after Enter pressed

The behavior of the input pressing the enter key should be like in any normal form, sending the form.

@github-actions github-actions bot temporarily deployed to pull request July 8, 2024 07:43 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 8, 2024 07:43 Inactive
@selankon
Copy link
Collaborator

selankon commented Jul 8, 2024

With this e218388 should be enough

@elboletaire elboletaire merged commit a1220a3 into main Jul 8, 2024
3 checks passed
@elboletaire elboletaire deleted the f/search-focus branch July 8, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants