@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
35 lines (34 loc) • 1.34 kB
JavaScript
'use client';
import '@ui5/webcomponents/dist/TableSelection.js';
import { withWebComponent } from '../../internal/withWebComponent.js';
/**
* The `TableSelection` component is used inside the `Table` ti add key-based selection capabilities to the `Table`.
*
* The component offers three selection modes:
* * Single - select a single row.
* * Multiple - select multiple rows.
* * None - no selection active.
*
* As the selection is key-based, `TableRow` components need to define a unique `row-key` property.
*
* ### Usage
*
* The `TableSelection` component is only used inside the `Table` component as a feature.
* It has to be slotted inside the `Table` in the `features` slot.
* The component is not intended to be used as a standalone component.
*
* ```html
* <Table>
* <TableSelection mode="Multiple" slot="features"></TableSelection>
* </Table>
* ```
*
*
*
* __Note__: This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)
*
* @since [2.0.0](https://github.com/SAP/ui5-webcomponents/releases/tag/v2.0.0) of __@ui5/webcomponents__.
*/
const TableSelection = withWebComponent('ui5-table-selection', ['mode', 'selected'], [], [], ['change']);
TableSelection.displayName = 'TableSelection';
export { TableSelection };