Set max column width in reports

This commit is contained in:
Hillel Coren 2022-05-05 14:27:32 +03:00
parent 3b6c97d6a0
commit 0abe5486f5
1 changed files with 15 additions and 5 deletions

View File

@ -1260,10 +1260,16 @@ class ReportResult {
final cell = row[index];
final column = sorted[j];
cells.add(
DataCell(cell.renderWidget(context, column), onTap: () {
viewEntityById(
entityId: cell.entityId, entityType: cell.entityType);
}),
DataCell(
ConstrainedBox(
constraints: BoxConstraints(maxWidth: kTableColumnWidthMax),
child: cell.renderWidget(context, column),
),
onTap: () {
viewEntityById(
entityId: cell.entityId, entityType: cell.entityType);
},
),
);
}
return DataRow(cells: cells);
@ -1578,7 +1584,11 @@ class ReportStringValue extends ReportElement {
@override
Widget renderWidget(BuildContext context, String column) {
return Text(renderText(context, column));
return Text(
renderText(context, column),
maxLines: 2,
overflow: TextOverflow.ellipsis,
);
}
@override