@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
36 lines (35 loc) • 1.62 kB
JavaScript
'use client';
import { withWebComponent } from '@ui5/webcomponents-react-base';
/**
* The `TableSelection` component is used inside the `Table` to 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! [TableSelection UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/TableSelection) | [Repository](https://github.com/UI5/webcomponents)
*
* @since [2.0.0](https://github.com/UI5/webcomponents/releases/tag/v2.0.0) of __@ui5/webcomponents__.
* @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.
* @deprecated This component is deprecated and will be removed in future releases. Use the `TableSelectionSingle` or `TableSelectionMulti` components instead.
*/
const TableSelection = withWebComponent('ui5-table-selection', ['mode', 'selected'], [], [], ['change']);
TableSelection.displayName = 'TableSelection';
export { TableSelection };