Row disappears after edit in editable grid

I added a click listener to my grid.

  1. I save the editor and 2) I edit the new item.
    grid.addItemClickListener(event -> {
		editor.save();
		editor.editItem(event.getItem());
	});

But after that the first row disappears. What’s wrong with my code?

It also happens in unbuffered mode.

Hi Simon,

Could you provide us a sample project which can reproduce this issue? Or you can also go and create a ticket for us [here]
(https://github.com/vaadin/vaadin-grid-flow/issues/new) with sample code and the steps to reproduce the bug.

Thanks

I tried to reproduce it with a simple sample but there it does not happen.

I can’t provide my source code because it is client code that is not open source and it will not run without the database.

Any hints how I can analyze the problem? Any log levels that I should set?

Simon Martinelli:
I tried to reproduce it with a simple sample but there it does not happen.

I can’t provide my source code because it is client code that is not open source and it will not run without the database.

Any hints how I can analyze the problem? Any log levels that I should set?

Have you managed to find a solution? I have the same problem, but after edit my panel disappears.

I have implemented a workaround. I do a refreshAll in the closeListener:

editor.addCloseListener(e -> grid.getDataProvider().refreshAll());

There are no JavaScript errors and unfortunately Vaadin does not log anything helpful.

Hope they will find the bug if reported: https://github.com/vaadin/flow/issues/5515

You should also file an issue on GitHub.

Please have a look at the following thread. I had the same issue and noted that the editor was not working correctly when the HashCode of the item was changing because of the edit. The items must keep their “id” (HashCode) durign this edit step. Other option is to extend DataProvider by yourself and override “getId()” method

https://vaadin.com/forum/thread/18453090/grid-with-editor-can-t-save-changed-data