-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ignore row details cells when applying cell update animation (#7079
- Loading branch information
1 parent
1dfbbcc
commit 5ed14aa
Showing
3 changed files
with
90 additions
and
6 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
...n-tests/src/main/java/com/vaadin/flow/component/gridpro/tests/GridProItemDetailsPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/** | ||
* Copyright 2000-2025 Vaadin Ltd. | ||
* | ||
* This program is available under Vaadin Commercial License and Service Terms. | ||
* | ||
* See {@literal <https://vaadin.com/commercial-license-and-service-terms>} for the full | ||
* license. | ||
*/ | ||
package com.vaadin.flow.component.gridpro.tests; | ||
|
||
import java.util.List; | ||
|
||
import com.vaadin.flow.component.gridpro.GridPro; | ||
import com.vaadin.flow.component.html.Div; | ||
import com.vaadin.flow.component.textfield.TextField; | ||
import com.vaadin.flow.data.renderer.TextRenderer; | ||
import com.vaadin.flow.router.Route; | ||
|
||
@Route(value = "gridpro-item-details") | ||
public class GridProItemDetailsPage extends Div { | ||
|
||
public GridProItemDetailsPage() { | ||
List<SamplePerson> persons = List.of(new SamplePerson("Henry"), | ||
new SamplePerson("Indiana"), new SamplePerson("Jones")); | ||
|
||
GridPro<SamplePerson> grid = new GridPro<>(); | ||
grid.addColumn(SamplePerson::getName).setHeader("Readonly Name"); | ||
grid.addEditColumn(SamplePerson::getName) | ||
.custom(new TextField(), SamplePerson::setName) | ||
.setHeader("Editable Name"); | ||
grid.setItemDetailsRenderer(new TextRenderer<>( | ||
person -> "Details for " + person.getName())); | ||
grid.setItems(persons); | ||
|
||
add(grid); | ||
} | ||
|
||
public static class SamplePerson { | ||
private String name; | ||
|
||
public SamplePerson(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...ion-tests/src/test/java/com/vaadin/flow/component/gridpro/tests/GridProItemDetailsIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* Copyright 2000-2025 Vaadin Ltd. | ||
* | ||
* This program is available under Vaadin Commercial License and Service Terms. | ||
* | ||
* See {@literal <https://vaadin.com/commercial-license-and-service-terms>} for the full | ||
* license. | ||
*/ | ||
package com.vaadin.flow.component.gridpro.tests; | ||
|
||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import com.vaadin.flow.component.gridpro.testbench.GridProElement; | ||
import com.vaadin.flow.testutil.TestPath; | ||
import com.vaadin.tests.AbstractComponentIT; | ||
|
||
@TestPath("gridpro-item-details") | ||
public class GridProItemDetailsIT extends AbstractComponentIT { | ||
|
||
@Before | ||
public void before() { | ||
open(); | ||
$(GridProElement.class).waitForFirst(); | ||
} | ||
|
||
@Test | ||
public void noErrorsLogged() { | ||
checkLogsForErrors(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters