Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f12ed7c
[doc] Add Datatable video tutorial
fzaninotto Jun 23, 2025
42d81e4
Add docs about hiddenColumns property of <DataTable>.
Madeorsk Jun 24, 2025
cfbfb1d
Merge pull request #10800 from marmelab/docs-datatable-hiddencolumns
fzaninotto Jun 24, 2025
a06587e
[no ci] Fix writing style
fzaninotto Jun 24, 2025
a7d73a1
Fix `<DataTable>` does not allow to put a button in the column's header
slax57 Jun 25, 2025
60a6d40
[chore] Avoid vercel deployment for `gh-pages` branch
djhi Jun 25, 2025
7ac4fa8
Merge pull request #10803 from marmelab/fix-vercel-config
slax57 Jun 25, 2025
efcfd1f
Merge pull request #10802 from marmelab/fix-datatable-header-button
djhi Jun 25, 2025
c3deb9d
apply DataTable codemod to stories
slax57 Jun 25, 2025
b8c3b07
[no ci] fix Resource nested story appearance
slax57 Jun 25, 2025
cbad10d
Merge pull request #10804 from marmelab/stories-datatable
djhi Jun 25, 2025
a1b411a
[Doc] Add a page for `<Scheduler>`
djhi Jun 25, 2025
cc927dd
Revert documentation update for `<Scheduler>`
djhi Jun 25, 2025
f328761
[Doc] Add a page for `<Scheduler>`
djhi Jun 25, 2025
7c10281
[no ci] [Doc] Fix `<DataTable.Col align>` default value and example
slax57 Jun 25, 2025
5d82f24
Merge pull request #10806 from marmelab/doc-datatable-align
djhi Jun 25, 2025
137a458
fix docs anchors and code examples
WiXSL Jun 25, 2025
0e018d4
Merge pull request #10807 from WiXSL/fix-docs-markdown
djhi Jun 25, 2025
f66df5c
Apply suggestions from code review
djhi Jun 26, 2025
da9499b
Merge pull request #10805 from marmelab/scheduler-doc
Madeorsk Jun 26, 2025
65fafa2
Fix Datagrid empty throws error when used in standalone mode
fzaninotto Jun 29, 2025
9358f22
Chore(tips): Sync tips from tips repository
jonathanarnault Jul 1, 2025
c1cfa29
Doc(demos): Add team wiki to demos documentation
jonathanarnault Jul 1, 2025
f705bfa
Fix links to react-admin-ee.marmelab.com in features
jonathanarnault Jul 1, 2025
d03544e
Merge pull request #10815 from marmelab/chore/update-tips
djhi Jul 1, 2025
6cb679c
Merge pull request #10816 from marmelab/doc/demo-team-wiki
fzaninotto Jul 1, 2025
85a5f34
Feat(doc): Add link to storybook in page toc for components and hooks…
jonathanarnault Jul 1, 2025
6cfddb6
Apply review comments
jonathanarnault Jul 1, 2025
57f2b0c
review
fzaninotto Jul 2, 2025
7554638
Merge pull request #10812 from marmelab/fix-datagrid-empty-standalone
djhi Jul 2, 2025
93a0f31
Merge pull request #10819 from marmelab/chore/link-storybook
djhi Jul 2, 2025
af8e25d
[Doc] Add flags to the supported locales list
fzaninotto Jul 3, 2025
783e463
v5.9.1
djhi Jul 3, 2025
c75dd3c
Update changelog for version 5.9.1
djhi Jul 3, 2025
b091b6e
Fix(doc): Update storybook link when switching documentation page
jonathanarnault Jul 3, 2025
73c5999
Merge pull request #10822 from marmelab/fix/link-storybook
djhi Jul 3, 2025
482e8cf
[Doc] Add more illustrations to the Demos page
fzaninotto Jul 3, 2025
6b0bdf8
[Doc] Mention the codemod in `<Datagrid>` documentation
djhi Jul 3, 2025
98e30e0
Merge pull request #10823 from marmelab/doc-datagrid-codemod
fzaninotto Jul 3, 2025
67c78e5
[Doc] Fix storybook detection and handling on client-side navigation
djhi Jul 3, 2025
f166bb6
Merge pull request #10824 from marmelab/fix-documentation-storybook-d…
Madeorsk Jul 3, 2025
d5e5ecb
Merge branch 'master' into next
djhi Jul 3, 2025
a7480c3
Fix tests after rebase
djhi Jul 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 5.9.1

* Fix `<Datagrid>` empty throws error when used in standalone mode ([#10812](https://github.com/marmelab/react-admin/pull/10812)) ([fzaninotto](https://github.com/fzaninotto))
* Fix `<DataTable>` does not allow to put a button in the column's header ([#10802](https://github.com/marmelab/react-admin/pull/10802)) ([slax57](https://github.com/slax57))
* [Doc] Add link to storybook in page toc for components and hooks that have storybook ([#10819](https://github.com/marmelab/react-admin/pull/10819)) ([jonathanarnault](https://github.com/jonathanarnault))
* [Doc] Add team wiki to demos documentation ([#10816](https://github.com/marmelab/react-admin/pull/10816)) ([jonathanarnault](https://github.com/jonathanarnault))
* [Doc] Fix anchors and code examples ([#10807](https://github.com/marmelab/react-admin/pull/10807)) ([WiXSL](https://github.com/WiXSL))
* [Doc] Fix `<DataTable.Col align>` default value and example ([#10806](https://github.com/marmelab/react-admin/pull/10806)) ([slax57](https://github.com/slax57))
* [Doc] Add `<DataTable hiddenColumns>` documentation ([#10800](https://github.com/marmelab/react-admin/pull/10800)) ([Madeorsk](https://github.com/Madeorsk))
* [Chore] Sync tips from tips repository ([#10815](https://github.com/marmelab/react-admin/pull/10815)) ([jonathanarnault](https://github.com/jonathanarnault))
* [Chore] Migrate stories to use DataTable ([#10804](https://github.com/marmelab/react-admin/pull/10804)) ([slax57](https://github.com/slax57))
* [Chore] Avoid vercel deployment for `gh-pages` branch ([#10803](https://github.com/marmelab/react-admin/pull/10803)) ([djhi](https://github.com/djhi))

## 5.9.0

* Add support for customization with MUI theme to inputs ([#10772](https://github.com/marmelab/react-admin/pull/10772)) ([Madeorsk](https://github.com/Madeorsk))
Expand Down
1 change: 1 addition & 0 deletions docs/Admin.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The Admin Component"
storybook_path: react-admin-admin--basic
---

# `<Admin>`
Expand Down
1 change: 1 addition & 0 deletions docs/AppBar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The AppBar Component"
storybook_path: ra-ui-materialui-layout-appbar--basic
---

# `<AppBar>`
Expand Down
1 change: 1 addition & 0 deletions docs/ArrayField.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The ArrayField Component"
storybook_path: ra-ui-materialui-fields-arrayfield--basic
---

# `<ArrayField>`
Expand Down
1 change: 1 addition & 0 deletions docs/ArrayInput.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The ArrayInput Component"
storybook_path: ra-ui-materialui-input-arrayinput--basic
---

# `<ArrayInput>`
Expand Down
1 change: 1 addition & 0 deletions docs/AutocompleteArrayInput.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The AutocompleteArrayInput Component"
storybook_path: ra-ui-materialui-input-autocompletearrayinput--basic
---

# `<AutocompleteArrayInput>`
Expand Down
1 change: 1 addition & 0 deletions docs/AutocompleteInput.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The AutocompleteInput Component"
storybook_path: ra-ui-materialui-input-autocompleteinput--basic
---

# `<AutocompleteInput>`
Expand Down
1 change: 1 addition & 0 deletions docs/BooleanField.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The BooleanField Component"
storybook_path: ra-ui-materialui-fields-booleanfield--basic
---

# `<BooleanField>`
Expand Down
1 change: 1 addition & 0 deletions docs/BooleanInput.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The BooleanInput Component"
storybook_path: ra-ui-materialui-input-booleaninput--basic
---

# `<BooleanInput>`
Expand Down
1 change: 1 addition & 0 deletions docs/CanAccess.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "CanAccess"
storybook_path: ra-core-auth-canaccess--basic
---

# `<CanAccess>`
Expand Down
1 change: 1 addition & 0 deletions docs/CheckboxGroupInput.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The CheckboxGroupInput Component"
storybook_path: ra-ui-materialui-input-checkboxgroupinput--basic
---

# `<CheckboxGroupInput>`
Expand Down
1 change: 1 addition & 0 deletions docs/ChipField.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The ChipField Component"
storybook_path: ra-ui-materialui-fields-chipfield--basic
---

# `<ChipField>`
Expand Down
1 change: 1 addition & 0 deletions docs/Configurable.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The Configurable Component"
storybook_path: ra-ui-materialui-preferences-configurable--basic
---

# `<Configurable>`
Expand Down
1 change: 1 addition & 0 deletions docs/Confirm.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The Confirm Component"
storybook_path: ra-ui-materialui-layout-confirm--back-click
---

# `<Confirm>`
Expand Down
1 change: 1 addition & 0 deletions docs/Count.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The Count Component"
storybook_path: ra-ui-materialui-list-count--basic
---

# `<Count>`
Expand Down
1 change: 1 addition & 0 deletions docs/Create.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The Create Component"
storybook_path: ra-ui-materialui-detail-create--basic
---

# `<Create>`
Expand Down
1 change: 1 addition & 0 deletions docs/CreateBase.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The CreateBase Component"
storybook_path: ra-core-controller-createbase--default-title
---

# `<CreateBase>`
Expand Down
1 change: 1 addition & 0 deletions docs/CustomRoutes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The CustomRoutes Component"
storybook_path: ra-core-core-customroutes--authenticated-custom-route
---

# `<CustomRoutes>`
Expand Down
50 changes: 40 additions & 10 deletions docs/DataTable.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
layout: default
title: "The DataTable Component"
storybook_path: ra-ui-materialui-list-datatable--basic
---

# `<DataTable>`

The `<DataTable>` component renders a list of records as a table. It supports sorting, row selection for bulk actions, a collapsible panel, hiding and reordering columns, dynamic row and cell styles, and more.

<iframe src="https://www.youtube-nocookie.com/embed/IHjBd9WrVcI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="aspect-ratio: 16 / 9;width:100%;margin-bottom:1em;"></iframe>

## Usage

Use `<DataTable>` inside a `ListContext` (e.g., as a descendent of [`<List>`](./List.md#list) or [`<ReferenceManyField>`](./ReferenceManyField.md)). Define the table columns with its children using `<DataTable.Col>` components:
Expand Down Expand Up @@ -141,7 +144,7 @@ const PostList = () => (
```
{% endraw %}

**Tip**: `<DataTable>` also lets you customize the table [header](#header) and [footer](#footer) components.
**Tip**: `<DataTable>` also lets you customize the table [header](#head) and [footer](#foot) components.

## `bulkActionButtons`

Expand Down Expand Up @@ -691,6 +694,33 @@ const PostList = () => (

**Tip**: To handle sorting in your custom DataTable head component, check out the [Building a custom sort control](./ListTutorial.md#building-a-custom-sort-control) section.

## `hiddenColumns`

By default, `<DataTable>` renders all `<DataTable.Col>` children. Use the `hiddenColumns` property to set hidden columns by default.

```tsx
import { ColumnsButton, TopToolbar, List, DataTable } from 'react-admin';

const PostListActions = () => (
<TopToolbar>
<ColumnsButton />
</TopToolbar>
)

const PostList = () => (
<List actions={<PostListActions />}>
<DataTable hiddenColumns={['id', 'author']}>
<DataTable.Col source="id" />
<DataTable.Col source="title" />
<DataTable.Col source="author" />
<DataTable.Col source="year" />
</DataTable>
</List>
);
```

Using `hiddenColumns` instead of removing `<DataTable.Col>` elements allows hidden columns to be displayed again using a `<ColumnsButton>`, as explained in the [Hiding or Reordering Columns](#hiding-or-reordering-columns) section.

## `hover`

By default, when a user hovers over a row, the background color changes to indicate the row is active. Set the `hover` prop to `false` to disable this behavior.
Expand All @@ -714,7 +744,7 @@ Using the `isRowExpandable` prop, you can customize which rows can have a collap
For instance, this code shows an expand button only for rows that have a detail to show:

```tsx
import { List, DataTable useRecordContext } from 'react-admin';
import { List, DataTable, useRecordContext } from 'react-admin';

const PostPanel = () => {
const record = useRecordContext();
Expand Down Expand Up @@ -960,13 +990,13 @@ Additional props are passed to [the MUI `<TableCell>`](https://mui.com/material-

### `align`

Table cells are right-aligned by default. To left-align a column, set the `align` prop to `"left"`. This is useful for numeric columns:
Table cells are left-aligned by default. To right-align a column, set the `align` prop to `"right"`. This is useful for numeric columns:

```tsx
<DataTable.Col
source="nb_views"
field={NumberField}
align="left"
align="right"
/>
```

Expand Down Expand Up @@ -1616,7 +1646,7 @@ An action column should not be sortable, so you don't need to specify a `source`

```tsx
<DataTable.Col>
<EditButton>
<EditButton />
<DeleteButton />
</DataTable.Col>
```
Expand Down Expand Up @@ -1652,9 +1682,9 @@ const ProductList = () => (
</CanAccess>
<CanAccess action="read" resource="products.reference">
<DataTable.Col source="reference" />
</DataTable.Col>
</CanAccess>
<CanAccess action="read" resource="products.category_id">
<DataTable.Col source="category_id" />
<DataTable.Col source="category_id">
<ReferenceField source="category_id" reference="categories" />
</DataTable.Col>
</CanAccess>
Expand Down Expand Up @@ -1686,9 +1716,9 @@ As this is quite verbose, you may prefer using the `<Datagrid>` component from t
- Users must have the `'read'` permission on a resource column to see it in the export:

```jsx
{ action: "read", resource: `${resource}.${source}` }.
{ action: "read", resource: `${resource}.${source}` }
// or
{ action: "read", resource: `${resource}.*` }.
{ action: "read", resource: `${resource}.*` }
```

- Users must have the `'delete'` permission on the resource to see the `<BulkExportButton>`.
Expand Down Expand Up @@ -1757,7 +1787,7 @@ const ProductList = () => (
**Tip**: Adding the 'read' permission for the resource itself doesn't grant the 'read' permission on the columns. If you want a user to see all possible columns, add the 'read' permission on columns using a wildcard:

```jsx
{ action: "read", resource: "products.*" }.
{ action: "read", resource: "products.*" }
```

## Typescript
Expand Down
3 changes: 2 additions & 1 deletion docs/Datagrid.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
layout: default
title: "The Datagrid Component"
storybook_path: ra-ui-materialui-list-datagrid--basic
---

# `<Datagrid>`

> **Note:** React-admin v5.8.0 introduced a successor to `<Datagrid>` called [`<DataTable>`](./DataTable.md). It offers a better developer experience by removing child inspection, and avoids 'polluting' the field components with props only serving in datagrid columns (e.g. sortBy, label, etc). Hence, we recommend using `<DataTable>` instead of `<Datagrid>` for new projects. `<Datagrid>` is of course still available for backward compatibility.
> **Note:** React-admin v5.8.0 introduced a successor to `<Datagrid>` called [`<DataTable>`](./DataTable.md). It offers a better developer experience by removing child inspection, and avoids 'polluting' the field components with props only serving in datagrid columns (e.g. sortBy, label, etc). Hence, we recommend using `<DataTable>` instead of `<Datagrid>` for new projects. `<Datagrid>` is of course still available for backward compatibility. If you want to migrate to `<DataTable>`, we offer a [codemod](./DataTable.md#migrating-from-datagrid-to-datatable) that makes it easier.

The `<Datagrid>` component renders a list of records as a table. It supports sorting, row selection for bulk actions, and an expand panel. It is usually used as a descendant of the [`<List>`](./List.md#list) and [`<ReferenceManyField>`](./ReferenceManyField.md) components. Outside these components, it must be used inside a `ListContext`.

Expand Down
1 change: 1 addition & 0 deletions docs/DateField.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The DateField Component"
storybook_path: ra-ui-materialui-fields-datefield--basic
---

# `<DateField>`
Expand Down
1 change: 1 addition & 0 deletions docs/DateInput.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The DateInput Component"
storybook_path: ra-ui-materialui-input-dateinput--basic
---

# `<DateInput>`
Expand Down
1 change: 1 addition & 0 deletions docs/DateTimeInput.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The DateTimeInput Component"
storybook_path: ra-ui-materialui-input-datetimeinput--basic
---

# `<DateTimeInput>`
Expand Down
52 changes: 51 additions & 1 deletion docs/Demos.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,35 @@ If you want to see what react-admin is capable of, or if you want to learn from
</div>
</div>
</div>
<div class="card">
<a href="#team-wiki" class="no-decoration"><img src="./img/team-wiki.jpg" alt="Kanban Board"></a>
<div class="content-card">
<a href="#team-wiki" class="no-decoration">
<p class="title-card"><b>Team Wiki</b></p>
<p class="description-card">A Team Wiki board built with React-admin Enterprise Edition</p>
</a>
</div>
<div class="card-footer">
<div class="links-container">
<p><b><a href="https://marmelab.com/team-wiki/" class="demo link">Demo</a></b></p>
<p><b><a href="https://github.com/marmelab/team-wiki" class="source-code link">Source code</a></b></p>
</div>
</div>
</div>
<div class="card">
<a href="#broadcom-layer-7-api-hub" class="no-decoration"><img src="https://marmelab.com/static/bcb26e245e6e50e8f13631a156727d2e/46097/API_Hub.png" alt="Developer Portal"></a>
<div class="content-card">
<a href="#broadcom-layer-7-api-hub" class="no-decoration">
<p class="title-card"><b>Developer portal</b></p>
<p class="description-card">Interactive documentation and rights administration for an API gateway</p>
</a>
</div>
<div class="card-footer">
<div class="links-container">
<p><b><a href="https://github.com/CAAPIM/APIHub" class="source-code link">Source code</a></b></p>
</div>
</div>
</div>
</div>

## E-commerce
Expand Down Expand Up @@ -414,11 +443,32 @@ The source shows how to implement the following features:
- [InPlace Edition](https://github.com/djhi/atomic-pm/blob/main/src/ra/EditInPlaceInput.tsx)
- [Drag & drop](https://github.com/djhi/atomic-pm/blob/main/src/boards/BoardShow.tsx)

## Team Wiki

A Team Wiki board built with React-admin Enterprise edition.

[![Team wiki](./img/team-wiki.jpg)](https://marmelab.com/team-wiki/)

* Demo: [https://marmelab.com/team-wiki/](https://marmelab.com/team-wiki/)
* Source code: [https://github.com/marmelab/team-wiki](https://github.com/marmelab/team-wiki)

It leverages the following Enterprise Edition features:
- [Navigation](https://react-admin-ee.marmelab.com/documentation/ra-navigation)
- [History](https://react-admin-ee.marmelab.com/documentation/ra-history)
- [Markdown](https://react-admin-ee.marmelab.com/documentation/ra-markdown)
- [Search](https://react-admin-ee.marmelab.com/documentation/ra-search)
- [Tree](https://react-admin-ee.marmelab.com/documentation/ra-tree)

The source shows how to implement the following features:
- [AppBar with Custom Navigation and Search](https://github.com/marmelab/team-wiki/blob/main/src/layout/AppBar.tsx)
- [Customizing the Markdown Input](https://github.com/marmelab/team-wiki/blob/main/src/inputs/PageMarkdownInput.tsx)
- [Custom List](https://github.com/marmelab/team-wiki/blob/main/src/resources/pages/PageList.tsx)

## Broadcom Layer 7 API Hub

A framework built on top of react-admin for building developer portals.

<div class="iframe-wrapper"><iframe src="https://www.youtube.com/embed/ecHsgNmug9E" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
[![Broadcom API Hub](https://marmelab.com/static/bcb26e245e6e50e8f13631a156727d2e/46097/API_Hub.png)](https://github.com/CAAPIM/APIHub)

* Source code: [https://github.com/CAAPIM/APIHub](https://github.com/CAAPIM/APIHub)

Expand Down
1 change: 1 addition & 0 deletions docs/Edit.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: "The Edit Component"
storybook_path: ra-ui-materialui-detail-edit--basic
---

# `<Edit>`
Expand Down
Loading
Loading