Skip to content

Commit

Permalink
feat(demo): add different alignments to test alignment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mlopezFC authored and javier-godoy committed Apr 9, 2024
1 parent 9b5a784 commit 1507385
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import com.flowingcode.vaadin.addons.demo.DemoSource;
import com.github.javafaker.Faker;
import com.vaadin.flow.component.grid.ColumnTextAlign;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.grid.Grid.Column;
import com.vaadin.flow.component.html.Div;
Expand All @@ -46,8 +47,11 @@ public GridExporterDemo() throws EncryptedDocumentException, IOException {
grid.removeAllColumns();
grid.setColumnReorderingAllowed(true);
Column<Person> nameCol = grid.addColumn("name").setHeader("Name");
nameCol.setTextAlign(ColumnTextAlign.START);
Column<Person> lastNameCol = grid.addColumn("lastName").setHeader("Last Name");
lastNameCol.setTextAlign(ColumnTextAlign.START);
Column<Person> budgetCol = grid.addColumn(item -> "$" + item.getBudget()).setHeader("Budget");
budgetCol.setTextAlign(ColumnTextAlign.END);
BigDecimal[] total = new BigDecimal[1];
total[0] = BigDecimal.ZERO;
Stream<Person> stream =
Expand Down

0 comments on commit 1507385

Please sign in to comment.