How I can change grid row height?
No one had such a problem?
I need to arrange a small text with the transfer.
auditGridCrud.getGrid().addColumn(new ComponentRenderer<>(auditDto -> {
Label label = new Label();
String prettyJson = toPrettyFormat(auditDto.getJson());
Stream.of(prettyJson).map(str -> str.split(StringUtils.LF)).flatMap(Arrays::stream).forEach(str -> {
Element text = ElementFactory.createSpan(str);
label.getElement().appendChild(text);
label.getElement().appendChild(ElementFactory.createBr());
});
return label;
})).setKey(AuditDto.FIELD_JSON).setWidth(JSON_COLUMN_WIDTH);
The solution is certainly not very
This theme module should work:
<dom-module id="custom-grid" theme-for="vaadin-grid">
<template>
<style>
:host {
line-height: 50px;
}
</style>
</template>
</dom-module>