docs: add section on row click in DataTable (#11694)

* docs: add section on row click in DataTable

* update subscriptions example
This commit is contained in:
Shahed Nasser
2025-03-03 18:08:06 +02:00
committed by GitHub
parent ab96ad3b82
commit 92514885e4
12 changed files with 10972 additions and 10678 deletions
@@ -12,13 +12,11 @@ export const metadata = {
<Note>
If you're using [Medusa v2.4.0+](https://github.com/medusajs/medusa/releases/tag/v2.4.0), it's recommended to use the [Data Table](../data-table/page.mdx) component instead.
If you're using [Medusa v2.4.0+](https://github.com/medusajs/medusa/releases/tag/v2.4.0), it's recommended to use the [Data Table](../data-table/page.mdx) component instead as it provides features for sorting, filtering, pagination, and more with a simpler API.
</Note>
The listing pages in the Admin show a table with pagination.
![Example of a table in the product listing page](https://res.cloudinary.com/dza7lstvk/image/upload/v1728295658/Medusa%20Resources/list_ddt9zc.png)
You can use the `Table` component from Medusa UI to display data in a table. It's mostly recommended for simpler tables.
To create a component that shows a table with pagination, create the file `src/admin/components/table.tsx` with the following content: