# EuiTableV2Component

**Type:** component



The `eui-table-v2` component has been built to offer various requested features including fast performance and excellent level of control over tabular presentation of data.

The eui-table is quite simple of usage and requires :

    - rows : the data value input as an array of objects, usually fetched from a service (data payload),
    - view : this is the template for the presentation with its various options such as the search filter, the paginator, sortable columns, etc.


**Selector:** `eui-table-v2, table[euiTableV2]`

## Inputs
- **data**: `DATA[]` - Data to display in the table.
- **filter**: `EuiTableV2FilterComponent` - `eui-table-v2-filter` reference passed to the table.
- **hasStickyCols**: `boolean` - Wheter the table col is sticky. In order to use eui-table sticky feature and control the scrolling overflow, we recommend to wrap the table with the provided eui-table-v2__scrollable-wrapper class and set your custom table width and/or height.  Only first or latest columns can be sticky.
- **hasStickyFooter**: `boolean` - Wheter the table footer is sticky. In order to use eui-table sticky feature and control the scrolling overflow, we recommend to wrap the table with the provided eui-table-v2__scrollable-wrapper class and set your custom table width and/or height.
- **hasStickyHeader**: `boolean` - Wheter the table header is sticky. In order to use eui-table sticky feature and control the scrolling overflow, we recommend to wrap the table with the provided eui-table-v2__scrollable-wrapper class and set your custom table width and/or height.
- **isAsync**: `boolean` - Wheter the table uses async data. In this configuration, pagination, filtering and sorting are managed by the backend.  When data are async, paginator and filter must not be bound to the eui-table component like in other sample.
- **isColsOrderable**: `boolean` - Wheter the cols can be reordered.
- **isLoading**: `boolean` - Wheter a loading spinner is displayed in the table.
- **isSelectOnlyVisibleRows**: `boolean` - Wheter the 'select all' checkbox in the header will select ONLY items in the current page.  If `false`, all items across the pages will be selected.
- **isTableBordered**: `boolean` - Whether the table use bordered styles.
- **isTableCompact**: `boolean` - Whether the table use compact design.
- **isTableFixedLayout**: `boolean` - Wheter the table has a fixed layout which forces a table to use fixed column widths, ignoring content size for faster and more predictable layout.
- **isTableResponsive**: `boolean` - Wheter the table is reponsive.
- **isVirtualScroll**: `boolean` - Wheter the table uses virtual scroll to display data.  `eui-table-v2` selector needs to be used in order to make virtual scroll working properly.
- **isVirtualScrollCache**: `boolean` - In combination with `isVirtualScroll`. Wheter the table caches the data when scroll. Means that if a scroll level has already loads data, the `scrollChange` event won't be emitted.
- **itemSize**: `number` - In combination with `isVirtualScroll`. Row height use by virtual scroll calculation.
- **paginator**: `EuiPaginatorComponent` - `eui-paginator` reference passed to the table.
- **preselectedRows**: `DATA[]` - In combination with `isDataSelectable`. Rows to be selected by default.
- **propId**: `string` - Unicity criteria of the data.
- **virtualScrollAsyncItemsLength**: `number` - In combination with `isVirtualScroll`. Total length of data that are displayed in the table with virtual scroll.
- **virtualScrollNbRows**: `number` - In combination with `isVirtualScroll`. Nb of data items to load in the table.

## Outputs
- **rowsSelect**: `EventEmitter` - In combination with `isDataSelectable` on a row. Event emitted when the selection changes with an array of data.
- **scrollChange**: `EventEmitter` - In combination with `isVirtualScroll`. Event emitted when a scroll is done.
- **sortChange**: `EventEmitter` - In combination with `isSortable` on the cols. Event emitted when the sort changes with the property displayed in the col and the order as `ASC` or `DESC`.
