!!!###!!!title=2.How to specify the width of a column and enable automatic line wrapping in a table component?——VisActor/VTable FAQ documents!!!###!!!

How to specify the width of a column and enable automatic line wrapping in a table component?

Question Description

Specify the width of a column in a table, and enable automatic line wrapping based on the width limit, while allowing the height of the cells to be determined by the actual number of content lines.How can I achieve this effect?

Solution

Add the following configuration to the table options.

heightMode: 'autoHeight', // the height of each row is determined by the content and will expand accordingly.
autoWrapText: true, // Enable automatic line wrapping.

Code Example

const option: TYPES.ListTableConstructorOptions = {
  records,
  columns,
  heightMode: 'autoHeight',
  autoWrapText: true
};

Results

Online demo

Quote