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

Customizable editorValidatorEvent for IncellEditing #746

Closed
crkives opened this issue Jan 18, 2019 · 1 comment
Closed

Customizable editorValidatorEvent for IncellEditing #746

crkives opened this issue Jan 18, 2019 · 1 comment
Assignees
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@crkives
Copy link

crkives commented Jan 18, 2019

There is no guarantee in receiving an immediate response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeReact PRO Support where support is provided within 4 business hours

I'm submitting a ... (check one with "x")

[ ] bug report
[x ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Plunkr Case (Bug Reports)
Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.

https://plnkr.co/edit/3KpsZTqlVa7KGYnh6ZVj?p=preview

Current behavior
Currently, button takes the priority over ending cell editing validator. If we are editing a field and click a button (save for example), the validation hasn't fired yet thus progressing with the bad data or in my case staged data that hasn't been validated yet. My example includes a simplified version of my staging of data. My project's version tracks multiple updates, whereas the one in the plunker example only allows one, but it's the same idea.

Expected behavior
The validator fires before the button fires. I've been able to temporarily solve this by editing the BodyCell source:
(bindDocumentEditListener method) by changing:
document.addEventListener('click', this.documentEditListener);
to
document.addEventListener('click', this.documentEditListener, true);

This has caused other issues, but I was able to work around those. Fixing it completely, probably requires more changes than just that, but I've made it workable for me currently.

Minimal reproduction of the problem with instructions
https://plnkr.co/edit/3KpsZTqlVa7KGYnh6ZVj?p=preview

  • Browser: all

  • Language: all

@cagataycivici cagataycivici changed the title DataTable edit validation firing after button Customizable editorValidatorEvent for IncellEditing Jan 22, 2019
@cagataycivici cagataycivici self-assigned this Jan 22, 2019
@cagataycivici cagataycivici added the Type: New Feature Issue contains a new feature or new component request label Jan 22, 2019
@cagataycivici cagataycivici added this to the 3.0.0-Final milestone Jan 22, 2019
@cagataycivici
Copy link
Member

Added editorValidatorEvent option to column, setting it to blur gives the expected behavior in your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

2 participants