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

#4120 DataTable: Selection and Row/Cell editing : Cannot input space character #4299

Closed
wants to merge 1 commit into from

Conversation

NikoGJ
Copy link
Contributor

@NikoGJ NikoGJ commented Aug 20, 2023

Fixes #4120
Allow input of space character in editor when Datatable has row selection + row edit features enabled

The old code for onSpaceKey was calling onEnterKey which was cancelling the keyboard event. As the event handlers were attached on the keydown events, the subsequent keypress events were not raised for standard HTML form controls living in the datatable cells.
The modification for onSpaceKey just executes the same code as in onEnterKey without the event.preventDefault(); thus living room for keypress events to be raised.

…hen Datatable has row selection + row edit features enabled
@vercel
Copy link

vercel bot commented Aug 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Aug 20, 2023 4:48pm

@tugcekucukoglu
Copy link
Member

DataTable selection behavior seems broken. This may require another solution.

Thanks for your time and effort.

@NikoGJ
Copy link
Contributor Author

NikoGJ commented Aug 23, 2023

Hi,
Well spotted, I didn't account for that.
I may have find another solution involving .self event modifier on the tag instead which seem to work consistently. Will submit a new PR

@tugcekucukoglu
Copy link
Member

If you have another solution, we gladly review it.

PRs are always welcomed.

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.

DataTable: Selection and Row/Cell editing : Cannot input space character
2 participants