-
Notifications
You must be signed in to change notification settings - Fork 422
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
unable to prevent cell editing in event onBeforeEditCell #992
Comments
I'll leave this one to @ghiscoding , I think it's probably a typescript issue. |
I don't have any problems with |
- related to comments in issue #992
- related to comments in issue #992
The comments seems invalid, also since we did not have any examples with
this is wrong, it doesn't return a Promise but rather a Lines 5926 to 5929 in 61e73db
So I'm closing since the details seems incorrect and there was also no feedback provided when asking for a repro |
Describe the bug
there is no way to prevent cellediting (returning false on the event subscriber) in beforeEditCell handler of the grid.
Reproduction
define and subscrive an event on grid onBeforeEditCell, in the body simply return false;
the cause is because of the protected method called in makeActiveCellEditable does a call to another method, named trigger:
if (this.trigger(this.onBeforeEditCell, { row: this.activeRow, cell: this.activeCell, item, column: columnDef, target: 'grid' }).getReturnValue() === false) {
But the test is wrong!: the return value IS not a boolean type but instead a Promise
I think makeActiveCellEditable is called on other sites, and the fix should affect even others parts.
Which Framework are you using?
Vanilla / Plain JS
Environment Info
Validations
The text was updated successfully, but these errors were encountered: