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

CellEditor should have onSubmit and onCancel method. #891

Closed
TonisPiip opened this issue May 17, 2019 · 1 comment
Closed

CellEditor should have onSubmit and onCancel method. #891

TonisPiip opened this issue May 17, 2019 · 1 comment
Assignees
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@TonisPiip
Copy link
Contributor

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

Current behavior
Currently there is no callbacks for when the editor is closed.
Expected behavior
There should be callbacks, which can be used submit altered data via an ajax, or cancel which would be used to revert cell data back to the original.

  • PrimeReact version:
    3.1.3

  • Browser: [all ]

  • Language: [all]

I have a working fork'd example which I will make a PR for soon.

@TonisPiip
Copy link
Contributor Author

Currently the editor is only closed when enter or tab is pressed, or via blur.
Escape should also close and call cancel.
Via blur should not be considered a cancel, but it might be good to have this be configurable.

In my DataTable I have double-click goto another page, the detail for the row. In that case neither onSubmit or onCancel is called, I think this might be the right course of action.

TonisPiip added a commit to lino-framework/primereact that referenced this issue May 17, 2019
TonisPiip added a commit to lino-framework/primereact that referenced this issue May 17, 2019
cagataycivici added a commit that referenced this issue May 30, 2019
#891 Add onEditorSubmit and  onEditorCancel callbacks for Column & BodyCell
@cagataycivici cagataycivici self-assigned this May 30, 2019
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label May 30, 2019
@cagataycivici cagataycivici added this to the 3.1.4 milestone May 30, 2019
@cagataycivici cagataycivici added Type: New Feature Issue contains a new feature or new component request and removed Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add labels May 30, 2019
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