My Vaadin application contains just 2 parts
Horizontal layout containing banner and several buttons;
Vertical layout with a grid. It is working as expected (mostly) but my problem that grid, containing over 2000 rows displays only three rows regardless of the window size. Here is screenshot of it:
I want it to occupy the whole page but nothing I was doing produce any effect on the grid size. Here is my class:
public class TableLayout extends VerticalLayout {
// some variables public TableLayout() { this.addClassName("book-table"); this.setSizeFull(); registrations = new ArrayList<>(); createBooksTable(); }
private void createBooksTable() { this.booksTable = new Grid<>(); this.booksTable.setWidth("100%"); this.booksTable.setMinHeight("100%"); this.yearRenderer = new HitYearRenderer(); this.booksTable.addColumn(this.yearRenderer).setHeader("Год").setWidth("8%"); this.booksTable.addColumn(new NewTagRenderer()).setWidth("60px"); this.booksTable.addColumn(new AuthorListRenderer()).setHeader("Автор(ы)").setAutoWidth(true); this.booksTable.addColumn(new TitleRenderer()).setHeader("Произведение").setWidth("50%"); this.booksTable.addColumn(new RatingRenderer()).setHeader("Оценки").setAutoWidth(true); this.booksTable.addColumn(new ReaderRatingRenderer()).setAutoWidth(true); this.booksTable.addColumn(new StatusRenderer()).setHeader("Статус").setAutoWidth(true); this.booksTable.setItemDetailsRenderer(new BookDetailsRenderer()); this.booksTable.addThemeVariants(GridVariant.LUMO_COMPACT); this.booksTable.addThemeVariants(GridVariant.LUMO_WRAP_CELL_CONTENT); } // some other code
}
and here is what my css file say:
.book-table {
width: 98%;
min-height: 100%;
background-color: whitesmoke
}
I did try setting 100% for the minHeight instead of full size. No effect at all. Can someone please tell me what else I can do to increase the table height.