You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As for the developer experience, react-admin is constantly evolving to find the sweet spot between an intuitive API, power user features, not too much magic, and just enough documentation. The core team are the first testers of react-admin, and pay attention to the productivity, debuggability, discoverability, performance, and robustness of all the hooks and components.
The `authProvider.logout()` method is also a good place to notify the authentication backend that the user credentials are no longer valid after logout.
Copy file name to clipboardexpand all lines: docs/Authentication.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,10 @@ title: "security"
5
5
6
6
# Security
7
7
8
-

8
+
<videocontrolsautoplaymutedloopwidth="100%">
9
+
<sourcesrc="./img/login.webm"type="video/webm">
10
+
Your browser does not support the video tag.
11
+
</video>
9
12
10
13
React-admin lets you secure your admin app with the authentication strategy of your choice. Since there are many possible strategies (Basic Auth, JWT, OAuth, etc.), react-admin delegates authentication logic to an `authProvider`.
To allow users to add new options, pass a React element as the `create` prop. `<AutocompleteArrayInput>` will then render a "Create" option at the bottom of the choices list. When clicked, it will render the create element.
**Tip**: This input doesn't let users set a `null` value - only `true` or `false`. Use the [`<NullableBooleanInput />`](./NullableBooleanInput.md) component if you have to handle non-required booleans.
@@ -365,7 +368,10 @@ To override the style of all instances of `<SkipNavigationButton>` using the [MU
365
368
366
369
The `<MenuItemLink>` component displays a menu item with a label and an icon - or only the icon with a tooltip when the sidebar is minimized. It also handles the automatic closing of the menu on tap on mobile.
Copy file name to clipboardexpand all lines: docs/Configurable.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,10 @@ title: "The Configurable Component"
7
7
8
8
This component makes another component configurable by the end user. When users enter the configuration mode, they can customize the component's settings via the inspector.
Bulk action buttons are buttons that affect several records at once, like mass deletion for instance. In the `<Datagrid>` component, the bulk actions toolbar appears when a user ticks the checkboxes in the first column of the table. The user can then choose a button from the bulk actions toolbar. By default, all Datagrids have a single bulk action button, the bulk delete button. You can add other bulk action buttons by passing a custom element as the `bulkActionButtons` prop of the `<Datagrid>` component:
To show more data from the resource without adding too many columns, you can show data in an expandable panel below the row on demand, using the `expand` prop.
394
400
@@ -804,7 +810,10 @@ const PostList = () => (
804
810
805
811
The [`<SelectColumnsButton>`](./SelectColumnsButton.md) component lets users hide, show, and reorder datagrid columns.
The column headers are buttons allowing users to change the list sort field and order. This feature requires no configuration and works out fo the box. The next sections explain how you can disable or modify the field used for sorting on a particular column.
Copy file name to clipboardexpand all lines: docs/DateInput.md
+8-2
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,10 @@ title: "The DateInput Component"
7
7
8
8
Ideal for editing dates, `<DateInput>` renders an HTML `<input type="date">` element, that most browsers display as a [date picker](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date).
The appearance of `<DateInput>` depends on the browser, and falls back to a text input on Safari. The date formatting in this input depends on the user's locale.
13
16
@@ -42,4 +45,7 @@ It is not possible to customize the date format. Browsers use the user locale to
42
45
43
46
If you need to render a UI despite the browser locale, MUI also proposes a [Date Picker](https://mui.com/components/pickers/#date-pickers) component, which is more customizable than the native date picker, but requires additional packages.
Copy file name to clipboardexpand all lines: docs/DateTimeInput.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,10 @@ title: "The DateTimeInput Component"
7
7
8
8
An input for editing dates with time. `<DateTimeInput>` renders an `<input type="datetime-local" >` element, that most browsers display as [date and time picker](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local).
Reference Input components are also very useful to filter a view by a related record. For instance, to display the list of books of a given author:
203
206
@@ -348,7 +351,10 @@ Check the following chapters to learn more about each search and filtering compo
348
351
349
352
Users often apply the same filters over and over again. Saved Queries **let users save a combination of filters** and sort parameters into a new, personal filter, that persists between sessions.
350
353
351
-
[](./img/SavedQueriesList.gif)
React-admin offers, out of the box, several **form layouts**:
455
464
@@ -627,7 +636,10 @@ When a user edits a record and hits the "Save" button, the UI shows a confirmati
627
636
628
637
But there is an additional benefit: it also allows the "Undo" feature. Undo is already functional in the admin at that point. Try editing a record, then hit the "Undo" link in the black confirmation box before it slides out. You'll see that the app does not send the `UPDATE` query to the API, and displays the non-modified data.
629
638
630
-
[](./img/tutorial_post_edit_undo.gif)
Even though updates appear immediately due to Optimistic Updates, React-admin only sends them to the server after a short delay (about 5 seconds). During this delay, **the user can undo the action**, and react-admin will never send the update.
633
645
@@ -792,7 +804,10 @@ Check the following components for more details:
792
804
793
805
To manage directories, categories, and any other **hierarchical data**, admins often rely on tree structures. Navigating and editing tree structures can be tricky, but React-admin provides a set of components to make it easy.
A user can lock a resource, either by voluntarily asking for a lock or by editing a resource. When a resource is locked, other users can't edit it. When the lock is released, other users can edit the resource again.
960
981
@@ -1012,7 +1033,10 @@ End-users tweak the UI to their liking, and **they expect these preferences to b
1012
1033
1013
1034
For instance, the Saved Queries feature lets users **save a combination of filters** and sort parameters into a new, personal filter.
1014
1035
1015
-
[](./img/SavedQueriesList.gif)
Saved queries persist between sessions, so users can find their custom queries even after closing and reopening the admin. Saved queries are available both for the Filter Button/Form combo and for the `<FilterList>` Sidebar. It's enabled by default for the Filter Button/Form combo but you have to add it yourself in the `<FilterList>` Sidebar.
1018
1042
@@ -1047,7 +1071,10 @@ const SongList = () => (
1047
1071
1048
1072
React-admin also **persists the light/dark mode and the language choice** of end-users.
To learn more about the `Store` and how to use it, check the following sections:
1053
1080
@@ -1063,7 +1090,10 @@ To learn more about the `Store` and how to use it, check the following sections:
1063
1090
1064
1091
An extension of preferences is Configurable components. Because no matter how polished your UI is, it will never fit all use cases. That's why react-admin provides a way to let end users **customize the features of many components visually**, via the inspector.
The default interface messages (for buttons, tooltips, input labels, etc) are in English. You can translate them to any of [the 30+ languages supported by react-admin](./TranslationLocales.md) by importing the appropriate translation package. For instance, to translate to French:
Copy file name to clipboardexpand all lines: docs/FilterButton.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,10 @@ title: "The FilterButton Component"
7
7
8
8
Part of the filter button/form combo, `<FilterButton>` renders whenever you use the `<List filters>` prop. When clicked, it reveals a dropdown of filter names, allowing users to add a new filter input to the filter form.
0 commit comments