You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a layout bug in GridPro that perhaps is related to either event chaining or timing.
It occurs after creating new columns, trying a recalculateColumnWidths() doesn’t help if done in the same event.
I only have the example from my repo, I don't have a small code example, sorry.
It is of cause possible that I have a bug, but the difference in the executed code from "bad layout" to "good layout" is very simple and to setup the example I need my repo demo.
I have a Select component that, during a valueChange event, triggers new columns creation and layout in the GridPro grid. After creating new columns I may or may not call recalculateColumnWidths() in the same valueChange event from the Select. In either casee the result is a GridPro with empty space between the rows, but when I either click a button or let a timer fire, then the call to recalculateColumnWidths() works fine. Here is a bit of code to give an idea:
startYear.addValueChangeListener(evt -> {
itemSubView.resetGrid(makeParams());
itemSubView.genericGrid.recalculateColumnWidths(); // Doesn't work
timer.setStartTime(3);
timer.start();
});
refreshBtn.addClickListener(evt -> {
itemSubView.genericGrid.recalculateColumnWidths(); // Now it works
});
timer.addTimerEndEvent(ev-> {
System.out.println("tick");
itemSubView.genericGrid.recalculateColumnWidths(); // Now it works
});
The test is a lot of code so you have to go and download the code to recreate it, use the “GridPro Generator Test” menu and try changing the Select values:
The test is a lot of code so you have to download the code to recreate it, then use the “GridPro Generator Test” menu and try changing the Select values.
Take a look in GridProGeneratorTest.java
Environment
OpenJDK 21.0.1
Vaadin 24.5.6
Spring boot 3.4.0
OS: Win 11
Browsers
Latest Firefox and Edge
No response
The text was updated successfully, but these errors were encountered:
Description
I have a layout bug in GridPro that perhaps is related to either event chaining or timing.
It occurs after creating new columns, trying a recalculateColumnWidths() doesn’t help if done in the same event.
I only have the example from my repo, I don't have a small code example, sorry.
It is of cause possible that I have a bug, but the difference in the executed code from "bad layout" to "good layout" is very simple and to setup the example I need my repo demo.
I have a Select component that, during a valueChange event, triggers new columns creation and layout in the GridPro grid. After creating new columns I may or may not call recalculateColumnWidths() in the same valueChange event from the Select. In either casee the result is a GridPro with empty space between the rows, but when I either click a button or let a timer fire, then the call to recalculateColumnWidths() works fine. Here is a bit of code to give an idea:
The test is a lot of code so you have to go and download the code to recreate it, use the “GridPro Generator Test” menu and try changing the Select values:
https://github.com/MikaelFiil/vaadin-gridpro-generator?tab=readme-ov-file
Here is how it look when it fails:
It doesn't seem to be related to issue #1864 since recalculateColumnWidths works the first time, it just has to be called after the initial event.
Expected outcome
I would expect the rows to be without extra space between them, like the image in the repo.
Minimal reproducible example
There is a lot of code behind the test, you have to download from here, sorry
https://github.com/MikaelFiil/vaadin-gridpro-generator?tab=readme-ov-file
Steps to reproduce
The test is a lot of code so you have to download the code to recreate it, then use the “GridPro Generator Test” menu and try changing the Select values.
Take a look in GridProGeneratorTest.java
Environment
OpenJDK 21.0.1
Vaadin 24.5.6
Spring boot 3.4.0
OS: Win 11
Browsers
Latest Firefox and Edge
No response
The text was updated successfully, but these errors were encountered: