Skip to content

Commit 5ae249c

Browse files
committed
Merge remote-tracking branch 'origin/master' into crm-can-access
2 parents 3878e14 + ad1fb56 commit 5ae249c

File tree

33 files changed

+393
-304
lines changed

33 files changed

+393
-304
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## 5.3.1
4+
5+
* Fix smart count for no results message ([#10295](https://github.com/marmelab/react-admin/pull/10295)) ([thibault-barrat](https://github.com/thibault-barrat))
6+
* Fix double decoding of ids in URLs ([#10293](https://github.com/marmelab/react-admin/pull/10293)) ([djhi](https://github.com/djhi))
7+
* Fix no results message has untranslated resource name ([#10291](https://github.com/marmelab/react-admin/pull/10291)) ([fzaninotto](https://github.com/fzaninotto))
8+
* Fix `<AutocompleteInput>` displays 'Create' option for choices that already exist when `createLabel` is provided ([#10288](https://github.com/marmelab/react-admin/pull/10288)) ([slax57](https://github.com/slax57))
9+
* [Doc] Fix Authorization link in Authentication page ([#10303](https://github.com/marmelab/react-admin/pull/10303)) ([djhi](https://github.com/djhi))
10+
* [Doc] Remove outdated warning about `<SimpleFormIterator>` cloning its children ([#10302](https://github.com/marmelab/react-admin/pull/10302)) ([slax57](https://github.com/slax57))
11+
* [Doc] fix example in README ([#10298](https://github.com/marmelab/react-admin/pull/10298)) ([antoinefricker](https://github.com/antoinefricker))
12+
* [Doc] Document react-hook-form limitation preventing using dynamically added inputs in `<ArrayInput>` with `shouldUnregister` ([#10271](https://github.com/marmelab/react-admin/pull/10271)) ([djhi](https://github.com/djhi))
13+
314
## 5.3.0
415

516
* Make authentication check pessimistic
@@ -262,6 +273,15 @@ We estimate that a react-admin app with 50,000 lines of code will require about
262273

263274
### Changelog
264275

276+
* [Doc] Fix Authorization link in Authentication page ([#10303](https://github.com/marmelab/react-admin/pull/10303)) ([djhi](https://github.com/djhi))
277+
* [Doc] Remove outdated warning about `<SimpleFormIterator>` cloning its children ([#10302](https://github.com/marmelab/react-admin/pull/10302)) ([slax57](https://github.com/slax57))
278+
* [Doc] fix example in README ([#10298](https://github.com/marmelab/react-admin/pull/10298)) ([antoinefricker](https://github.com/antoinefricker))
279+
* Fix smart count for no results message ([#10295](https://github.com/marmelab/react-admin/pull/10295)) ([thibault-barrat](https://github.com/thibault-barrat))
280+
* Fix double decoding of ids in URLs ([#10293](https://github.com/marmelab/react-admin/pull/10293)) ([djhi](https://github.com/djhi))
281+
* Fix no results message has untranslated resource name ([#10291](https://github.com/marmelab/react-admin/pull/10291)) ([fzaninotto](https://github.com/fzaninotto))
282+
* Fix `<AutocompleteInput>` displays 'Create' option for choices that already exist when `createLabel` is provided ([#10288](https://github.com/marmelab/react-admin/pull/10288)) ([slax57](https://github.com/slax57))
283+
* [Doc] Document react-hook-form limitation preventing using dynamically added inputs in `<ArrayInput>` with `shouldUnregister` ([#10271](https://github.com/marmelab/react-admin/pull/10271)) ([djhi](https://github.com/djhi))
284+
265285
* [Doc] Update `<StackedFilters>` doc for `ra-form-layout` v5.2.0 ([#10268](https://github.com/marmelab/react-admin/pull/10268)) ([erwanMarmelab](https://github.com/erwanMarmelab))
266286
* Fix `<AutoCompleteInput>` should not display a "Create" option when the filter is empty ([#10266](https://github.com/marmelab/react-admin/pull/10266)) ([erwanMarmelab](https://github.com/erwanMarmelab))
267287
* Fix pnpm error Module not found: Can't resolve '@mui/utils' ([#10264](https://github.com/marmelab/react-admin/pull/10264)) ([slax57](https://github.com/slax57))

docs/ArrayInput.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ Check [the `<SimpleFormIterator>` documentation](./SimpleFormIterator.md) for de
7979

8080
**Tip**: If you need to edit an array of *related* records, i.e. if the `items` above actually come from another resource, you should use a [`<ReferenceManyInput>`](./ReferenceManyInput.md) instead.
8181

82+
**Note**: Using [`shouldUnregister`](https://react-hook-form.com/docs/useform#shouldUnregister) should be avoided when using `<ArrayInput>` (which internally uses `useFieldArray`) as the unregister function gets called after input unmount/remount and reorder. This limitation is mentioned in the react-hook-form [documentation](https://react-hook-form.com/docs/usecontroller#props). If you are in such a situation, you can use the [`transform`](https://marmelab.com/react-admin/Edit.html#transform) prop to manually clean the submitted values.
83+
8284
## Props
8385

8486
`<ArrayInput>` accepts the [common input props](./Inputs.md#common-input-props) (except `format` and `parse`).

docs/Authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export const dataProvider = addRefreshAuthToDataProvider(baseDataProvider, refre
416416

417417
## Authorization
418418

419-
Access control and permissions allow you to restrict certain pages to specific users. React-admin provides powerful primitives for implementing authorization logic. For detailed guidance, check out the [Authorization](./Authorization.md) documentation.
419+
Access control and permissions allow you to restrict certain pages to specific users. React-admin provides powerful primitives for implementing authorization logic. For detailed guidance, check out the [Authorization](./Permissions.md) documentation.
420420

421421
<video controls autoplay muted loop>
422422
<source src="./img/AccessControl.mp4" type="video/mp4"/>

docs/Forms.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,8 @@ import { FormDataConsumer } from 'react-admin';
363363
364364
**Note**: By default, `react-hook-form` submits values of unmounted input components. In the above example, the `shouldUnregister` prop of the `<SimpleForm>` component prevents that from happening. That way, when end users hide an input, its value isn't included in the submitted data.
365365
366+
**Note**: `shouldUnregister` should be avoided when using `<ArrayInput>` (which internally uses `useFieldArray`) as the unregister function gets called after input unmount/remount and reorder. This limitation is mentioned in the react-hook-form [documentation](https://react-hook-form.com/docs/usecontroller#props). If you are in such a situation, you can use the [`transform`](https://marmelab.com/react-admin/Edit.html#transform) prop to manually clean the submitted values.
367+
366368
## Transforming Form Values Before Submitting
367369
368370
Sometimes, you may want to alter the form values before sending them to the `dataProvider`. For those cases, use the `transform` prop either on the view component (`<Create>` or `<Edit>`) or on the `<SaveButton>` component.

docs/Inputs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,8 @@ import { FormDataConsumer } from 'react-admin';
707707

708708
**Note**: By default, `react-hook-form` submits values of unmounted input components. In the above example, the `shouldUnregister` prop of the `<SimpleForm>` component prevents that from happening. That way, when end users hide an input, its value isn't included in the submitted data.
709709

710+
**Note**: `shouldUnregister` should be avoided when using `<ArrayInput>` (which internally uses `useFieldArray`) as the unregister function gets called after input unmount/remount and reorder. This limitation is mentioned in the react-hook-form [documentation](https://react-hook-form.com/docs/usecontroller#props). If you are in such a situation, you can use the [`transform`](https://marmelab.com/react-admin/Edit.html#transform) prop to manually clean the submitted values.
711+
710712
## Overriding The Input Variant
711713

712714
Material UI offers [3 variants for text fields](https://mui.com/material-ui/react-text-field/#basic-textfield): `outlined`, `filled`, and `standard`. The default react-admin theme uses the `filled` variant.

docs/SimpleFormIterator.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ import { ArrayInput, SimpleFormIterator, DateInput, TextField, FormDataConsumer,
185185
</ArrayInput>
186186
```
187187
188-
**Caution**: `<SimpleFormIterator>` **clones** its children several times, as it needs to override their actual source for each record. If you use a custom Input element, make sure they accept a custom `source` prop.
189-
190188
## `className`
191189
192190
CSS classes passed to the root component.

docs/TabbedForm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ export const TagEdit = () => (
510510

511511
- `label`: the label of the tab
512512
- `path`: the path of the tab in the URL (ignored when `syncWithLocation={false}`)
513-
- `count`: the number of items in the tab (dislayed close to the label)
513+
- `count`: the number of items in the tab (displayed close to the label)
514514
- `sx`: custom styles to apply to the tab
515515
- `children`: the content of the tab (usually a list of inputs)
516516

docs/TabbedShowLayout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ It accepts the following props:
8686
- `label`: The string displayed for each tab
8787
- `icon`: The icon to show before the label (optional). Must be a component.
8888
- `path`: The string used for custom urls (optional)
89-
- `count`: the number of items in the tab (dislayed close to the label)
89+
- `count`: the number of items in the tab (displayed close to the label)
9090

9191
```jsx
9292
// in src/posts.js

examples/data-generator/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "data-generator-retail",
3-
"version": "5.3.0",
3+
"version": "5.3.1",
44
"homepage": "https://github.com/marmelab/react-admin/tree/master/examples/data-generator",
55
"bugs": "https://github.com/marmelab/react-admin/issues",
66
"license": "MIT",
@@ -19,7 +19,7 @@
1919
},
2020
"devDependencies": {
2121
"cross-env": "^5.2.0",
22-
"ra-core": "^5.3.0",
22+
"ra-core": "^5.3.1",
2323
"rimraf": "^3.0.2",
2424
"typescript": "^5.1.3"
2525
},

examples/simple/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simple",
3-
"version": "5.3.0",
3+
"version": "5.3.1",
44
"private": true,
55
"type": "module",
66
"scripts": {
@@ -18,13 +18,13 @@
1818
"@tanstack/react-query-devtools": "^5.8.4",
1919
"jsonexport": "^3.2.0",
2020
"lodash": "~4.17.5",
21-
"ra-data-fakerest": "^5.3.0",
22-
"ra-i18n-polyglot": "^5.3.0",
23-
"ra-input-rich-text": "^5.3.0",
24-
"ra-language-english": "^5.3.0",
25-
"ra-language-french": "^5.3.0",
21+
"ra-data-fakerest": "^5.3.1",
22+
"ra-i18n-polyglot": "^5.3.1",
23+
"ra-input-rich-text": "^5.3.1",
24+
"ra-language-english": "^5.3.1",
25+
"ra-language-french": "^5.3.1",
2626
"react": "^18.3.1",
27-
"react-admin": "^5.3.0",
27+
"react-admin": "^5.3.1",
2828
"react-dom": "^18.3.1",
2929
"react-hook-form": "^7.53.0",
3030
"react-router": "^6.22.0",

0 commit comments

Comments
 (0)