In my Grid I add a column with buttons for editing the row. There is an edit button and a save button. The save button is initially hidden, and when the edit button is clicked, I want to (edit the item and) hide the edit button and show the save button.
However, when the edit button is clicked the following happens:
The row does go into edit mode, all defined EditorComponents show up.
The Edit button does not hide, and the save button does not show.
There is no error or exception in console or server log.
No push is not used here. I have not yet encountered similar problems with button click listeners, in other cases it updates the UI just fine. I will test the very same editLayout outside of a componenRenderer next monday and will update here what I find out.
As I thought, when I place this exact code (without the grid edit and save lines) in any layout outside of a grid (no ComonentRenderer), the hiding and showing of the two buttons works flawlessly.
I have now also tried commenting out these lines in the button clickListeners:
And now it works! So the cause was not the ComponentRenderer but the grid editor. There seems to be something wrong with the editor - not only with the [saveListener]
(https://vaadin.com/forum/thread/17165917/17487653) but now also with the grid.editItem().
Am I missing critical information about the grid editor? Is there a working example of a flow grid with an editor?
I was able to make the editor work perfectly using this code sample.
The biggest difference between my approach above and the one that was used in the code sample is that the save and cancel buttons are defined as the editorComponent of the edit column, therefore there is no manual hiding / showing of the buttons necessary