Along with the evolutionary web development, table component has always been the most popular component in our web apps especially for dashboards, data analysis. For [Table V1](./table.md), with even just 1000 records of data, it can be very annoying when using it, because the poor performance.
With Virtualized Table, you can render massive chunks of data in a blink of an eye.
This component is **still under testing**, use at your own risk. if you found any bug or issue please report it at [GitHub](https://github.com/element-plus/element-plus/issues) for us to fix. Also there were some APIs which was not mentioned in this documentation, some of them were not
fully developed yet, so that we are not mentioning them here.
**Even though** Virtualized Table is efficient, but when the data load is too big, your **network**, **memory size** can be the bottle neck of your app. So keep in mind that Virtualized Table is never the ultimate solution for everything, consider paginate your data, add filters etc.
:::
## Basic usage
Let's render a basic case of Virtualized Table with 10 columns by 1000 rows, to demonstrate how performant it is.
You can highlight your table content to distinguish between "success, information, warning, danger" and other states.
Use `row-class-name` to customize how the row looks. In this case, every 10th row will be highlighted with `bg-blue-200` class, every 5th row will be highlighted with `bg-red-100` class.
By customizing your header renderer you can group your header like this example did.
:::tip
In this case we used `JSX` feature which is not supported in the playground, you may try them out in your local environment or online IDEs such as `codesandbox`.
It is recommended that you write your table component in JSX, since it contains VNode manipulations.
Virtualized table did not use built-in `table` element, so that `colspan` and `rowspan` is a little bit different than [TableV1](./table.md). With customized row renderer, we can still do that. In this case, you'll learn how to do that.
:::demo
table-v2/colspan
:::
## Rowspan
Since we have [Colspan](#colspan) of course we have row span as well, it is a little bit different than colspan but the idea
is basically the same.
:::demo
table-v2/rowspan
:::
## Rowspan and Colspan together
We can combine rowspan and colspan together to meet your business goal!
| cache | Number of rows rendered in advance for boosting the performance | Number | 2 |
| estimated-row-height | The estimated row height for rendering dynamic height rows | Number | - |
| header-class | Customized class name passed to header wrapper | String/Function\<[HeaderClassGetter](#typings)\> | - |
| header-props | Customized props name passed to header component | Object/Function\<[HeaderPropsGetter](#typings)\> | - |
| header-cell-props | Customized props name passed to header cell component | Object/Function\<[HeaderCellPropsGetter](#typings)\> | - |
| header-height | The height of entire header, when it's array, it will render as many header rows as the given array's length | Number/Array\<Number\> | 50 |
| footer-height | The height of the footer element, when presented, it will be part of the calculation of the table's height. | Number | 0 |
| row-class | Customized class name passed to row wrapper | String/Function\<[RowClassGetter](#typings)\> | - |
| row-key | The key of each row, if not provided, it will be the index of the row | String/Symbol/Number | id |
| row-props | Customized props name passed to row component | Object/Function\<[RowPropsGetter](#typings)\> | - |
| row-height | The height of each row, used for calculating the total height of the table | Number | 50 |
| columns | An array of column definitions. | Array\<[Column](#column-attribute)\> | - |
| data | An array of data to be rendered in the table. | Array\<[Data](#typings)\> | [] |
| data-getter | An method which helps customizing the how to fetch the data from the data source. | Function | - |
| fixed-data | Data for rendering rows above the main content and below the header | Array\<[Data](#typings)\> | - |
| expand-column-key | The column key indicates which row is expandable | String | - |
| expanded-row-keys | An array of keys for expanded rows, can be used with `v-model` | Array\<[KeyType](#typings)\> | - |
| default-expanded-row-keys | An array of keys for default expanded rows, **NON REACTIVE** | Array\<[KeyType](#typings)\> | - |
| class | Class name for the the virtual table, will be applied to all three tables (left, right, main) | String/Array/Object | - |
| fixed | Flag indicates the table column's width is a fixed or flexible. | Boolean | false |
| width \* | Width for the table, required | Number | - |
| height \* | Height for the table, required | Number | - |
| max-height | Maximum height for the table | Number | - |
| h-scrollbar-size | Indicates the horizontal scrollbar's size for the table, used to prevent the horizontal and vertical scrollbar to collapse | Number | 6 |
| v-scrollbar-size | Indicates the horizontal scrollbar's size for the table, used to prevent the horizontal and vertical scrollbar to collapse | Number | 6 |
| scrollbar-always-on | If true, the scrollbar will always be shown instead of when mouse is placed above the table | Boolean | false |
| align | Alignment of the table cell content | [Alignment](https://github.com/element-plus/element-plus/blob/b92b22932758f0ddea98810ae248f6ca62f77e25/packages/components/table-v2/src/constants.ts#L6) | left |
| class | Class name for the column | String | - |
| fixed | Fixed direction of the column | Boolean/[FixedDir](https://github.com/element-plus/element-plus/blob/b92b22932758f0ddea98810ae248f6ca62f77e25/packages/components/table-v2/src/constants.ts#L11) | false |
| flexGrow | CSSProperties flex grow, Only useful when not this is not a fixed table | Number | 0 |
| flexShrink | CSSProperties flex shrink, Only useful when not this is not a fixed table | Number | 1 |
| headerClass | Used for customizing header column class | String | - |
| hidden | Whether the column is invisible | Boolean | - |
| style | Customized style for column cell, will be merged with grid cell | CSSProperties | - |
| sortable | Indicates whether the column is sortable | Boolean | - |
| title | The default text rendered in header cell | String | - |
| maxWidth | Maximum width for the column | String | - |
| minWidth | Minimum width for the column | String | - |
| width \* | Width for the column **Required** | Number | - |