Skip to content

Commit

Permalink
fix(demo): reorder "roles" column
Browse files Browse the repository at this point in the history
Close #8
  • Loading branch information
paodb authored and javier-godoy committed Oct 2, 2023
1 parent cb4f111 commit b68f541
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,19 @@ public BadgeListDemo() {

grid.addColumn(Person::getFirstName).setHeader("First Name").setAutoWidth(true).setFlexGrow(0);
grid.addColumn(Person::getLastName).setHeader("Last Name").setAutoWidth(true).setFlexGrow(0);
grid.addComponentColumn(
person -> {
List<Badge> badges = new ArrayList<>();
person.getRoles().forEach(role -> badges.add(new Badge(role)));
return new BadgeList(badges);
})
.setHeader("Roles")
.setResizable(true);
grid.addColumn(Person::getEmailAddress).setHeader("Email").setAutoWidth(true).setFlexGrow(0);
grid.addColumn(Person::getPhoneNumber)
.setHeader("Phone number")
.setAutoWidth(true)
.setFlexGrow(0);

grid.addComponentColumn(
person -> {
List<Badge> badges = new ArrayList<>();
person.getRoles().forEach(role -> badges.add(new Badge(role)));
return new BadgeList(badges);
})
.setHeader("Roles")
.setResizable(true);

grid.addColumn(Person::getTitle).setHeader("Title");

grid.setWidthFull();
Expand Down

0 comments on commit b68f541

Please sign in to comment.