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

'finalizeCellEdit' event is not dispatched properly when cell is updated after error #6845

Closed
marciogurka opened this issue May 24, 2023 · 0 comments
Assignees
Labels
feature request forum Issues from forum high-priority Urgent to have fixed OEM OEM customer resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@marciogurka
Copy link

Forum post

"Bryntum documentation says to use finalizeCellEdit to check if the value introduced is correct or not. If the introduced value is incorrect, we should return false and the expected behaviour of the cell in this case could be configured using invalidAction.

However, this isn't working properly. If we configure invalidAction with 'revert' or 'block' the editor is not closed and the finalizeCellEdit event is never dispatched again so we can't fix the value of the cell to a new one. That the editor is not closed is great in our case as we also want to show a message error using setError but to be able to fix the cell value is still needed.

Here a video of the error happening with invalidAction as 'revert' on this bryntum demo.

Screen.Recording.2023-05-24.at.17.07.26.mov

On the video, first, we insert an incorrect value and we fixed it with another incorrect value. Then we insert an incorrect value and we fixed it with a correct value.

To be able to reproduce it, just change the Score column configuration for:

        {
          text : 'Score',
          field : 'score', 
          editor : 'number',
          finalizeCellEdit: ({value, inputField}) =>{ 
		console.log('finalizeCellEdit');
		inputField.setError('error message');
		return value > 30;
	  },
	  invalidAction: 'revert',
           width : '5em'
 },

"

@marciogurka marciogurka added bug Something isn't working forum Issues from forum OEM OEM customer labels May 24, 2023
@matsbryntse matsbryntse added the high-priority Urgent to have fixed label Jun 13, 2023
@canonic-epicure canonic-epicure self-assigned this Jul 4, 2023
@canonic-epicure canonic-epicure added in progress ready for review Issue is fixed, the pull request is being reviewed and removed in progress labels Jul 4, 2023
@canonic-epicure canonic-epicure added resolved Fixed but not yet released (available in the nightly builds) and removed ready for review Issue is fixed, the pull request is being reviewed labels Jul 24, 2023
@canonic-epicure canonic-epicure added this to the 5.4.2 milestone Jul 24, 2023
@SergeyMaltsev SergeyMaltsev added feature request and removed bug Something isn't working labels Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request forum Issues from forum high-priority Urgent to have fixed OEM OEM customer resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

4 participants