Skip to content

Commit

Permalink
Merge pull request #9449 from WiXSL/fix-typos-anchors
Browse files Browse the repository at this point in the history
[Doc] Fix typos and anchors
  • Loading branch information
fzaninotto authored Nov 16, 2023
2 parents 9768ee1 + 77fa882 commit f6c637a
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docs/Calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const EventList = () => (
```
{% endraw %}

Check the possible values for `ListProps` in [the `<List>` component documentation](./List.html#the-list-component).
Check the possible values for `ListProps` in [the `<List>` component documentation](./List.md).

### `CalendarProps`

Expand Down
6 changes: 3 additions & 3 deletions docs/DataProviders.md
Original file line number Diff line number Diff line change
Expand Up @@ -743,9 +743,9 @@ export const dataProvider: DataProvider = {

### Sending Files To A Third-Party Service

A common way to handle file uploads in single-page-apps is to first upload the file to a CDN such as [Cloudinary](https://cloudinary.com/) or [CloudImage](https://www.cloudimage.io/en/home), then use the the file URL generated by the CDN in the record creation / modification payload.
A common way to handle file uploads in single-page-apps is to first upload the file to a CDN such as [Cloudinary](https://cloudinary.com/) or [CloudImage](https://www.cloudimage.io/en/home), then use the file URL generated by the CDN in the record creation / modification payload.

Lets see an example with the [https://cloudinary.com/](Cloudinary) service, by adapting the `dataProvider` according to [their "Authenticated requests" example](hhtps://cloudinary.com/documentation/upload_images#authenticated_requests).
Let's see an example with the [Cloudinary](https://cloudinary.com/) service, by adapting the `dataProvider` according to [their "Authenticated requests" example](hhtps://cloudinary.com/documentation/upload_images#authenticated_requests).

To do that, you need an API that serves a [`signature`](https://cloudinary.com/documentation/upload_images#generating_authentication_signatures) in the format that Cloudinary expect. To make it easier, you can install the [`cloudinary` package](https://cloudinary.com/documentation/node_integration#installation_and_setup).

Expand Down Expand Up @@ -854,4 +854,4 @@ const dataProvider = withLifecycleCallbacks(
);
```

Feel free to read the [Cloudinary Get Started doc](https://cloudinary.com/documentation/programmable_media_overview) to learn more.
Feel free to read the [Cloudinary Get Started doc](https://cloudinary.com/documentation/programmable_media_overview) to learn more.
2 changes: 1 addition & 1 deletion docs/DatagridAG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Here are the important things to note:

## Defaults

Under the hood, `<DatagridAG>` is a wrapper around `<AgGridReact>`. However it sets some important default values:
Under the hood, `<DatagridAG>` is a wrapper around `<AgGridReact>`. However, it sets some important default values:

- `pagination` is set to `true`
- `paginationAutoPageSize` is set to `true`
Expand Down
2 changes: 1 addition & 1 deletion docs/Edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ const PostEdit = () => {
```
{% endraw %}

**Tip**: In `optimistic` and `undoable` mutation modes, react-admin calls the the `onSuccess` callback method with no argument. In `pessimistic` mode, it calls it with the response returned by the dataProvider as argument.
**Tip**: In `optimistic` and `undoable` mutation modes, react-admin calls the `onSuccess` callback method with no argument. In `pessimistic` mode, it calls it with the response returned by the dataProvider as argument.

You can do the same for error notifications, by passing a custom `onError` callback.

Expand Down
2 changes: 1 addition & 1 deletion docs/Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ A UI kit like Material UI provides basic building blocks like a button, a form,
These building blocks include:

- A [notification system](./useNotify.md)
- A smart location framework, simplifying the management of [breadcrumbs](./Breadcrumb.md) an [hierarchical menus](./MultiLevelMenu.md)
- A smart location framework, simplifying the management of [breadcrumbs](./Breadcrumb.md) and [hierarchical menus](./MultiLevelMenu.md)
- [Import](https://github.com/benwinding/react-admin-import-csv) / [export](./Buttons.md#exportbutton) buttons
- An [editable datagrid](./EditableDatagrid.md)
- A [guided tour system](https://marmelab.com/ra-enterprise/modules/ra-tour)
Expand Down
2 changes: 1 addition & 1 deletion docs/FileInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,4 @@ const MyEdit = (props) => {

## Uploading Files

Handling files uploads in react-admin is the dataProvider's job. Learn how to do that in the [Handling File Uploads section from the dataProvider documentation](./DataProviders.md/#handling-file-uploads).
Handling files uploads in react-admin is the dataProvider's job. Learn how to do that in the [Handling File Uploads section from the dataProvider documentation](./DataProviders.md#handling-file-uploads).
4 changes: 2 additions & 2 deletions docs/ImageInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ After modification by the user, the value is stored as an array of objects with
* `src`: An [object URL](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL) for the `File`, e.g. 'blob:https://example.com/1e67e00e-860d-40a5-89ae-6ab0cbee6273'
* `rawFile`: [The `File` object](https://developer.mozilla.org/fr/docs/Web/API/File) itself

It is the responsibility of your `dataProvider` to send the file to the server (encoded in Base64, or using multipart upload) and to transform the `src` property. See the [Handling File Uploads section from the dataProvider documentation](./DataProviders.md/#handling-file-uploads) for an example.
It is the responsibility of your `dataProvider` to send the file to the server (encoded in Base64, or using multipart upload) and to transform the `src` property. See the [Handling File Uploads section from the dataProvider documentation](./DataProviders.md#handling-file-uploads) for an example.

Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.

Expand Down Expand Up @@ -173,4 +173,4 @@ To override the style of all instances of `<ImageInput>` using the [application-

## Uploading Images

Handling image uploads in react-admin is the dataProvider's job. Learn how to do that in the [Handling File Uploads section from the dataProvider documentation](./DataProviders.md/#handling-file-uploads).
Handling image uploads in react-admin is the dataProvider's job. Learn how to do that in the [Handling File Uploads section from the dataProvider documentation](./DataProviders.md#handling-file-uploads).
10 changes: 5 additions & 5 deletions docs/PrevNextButtons.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export const MyAdmin = () => (
`<PrevNextButtons>` can get the current list parameters (sort and filters) from the store.
This prop is useful if you specified a custom `storeKey` for a `<List>` and you want `<PrevNextButtons>` to use the same stored parameters.

See [`storeKey` in `<List>`](./List.md#storekey) for more informations.
See [`storeKey` in `<List>`](./List.md#storekey) for more information.

```tsx
export const MyAdmin = () => (
Expand Down Expand Up @@ -330,7 +330,7 @@ export const MyAdmin = () => (

## `sx`

The `<PrevNextButtons>` component accepts the usual `className` prop but you can override many class names injected to the inner components by React-admin thanks to the `sx` property (as most Material UI components, see their [documentation about it](https://mui.com/material-ui/customization/how-to-customize/#overriding-nested-component-styles)). This property accepts the following subclasse:
The `<PrevNextButtons>` component accepts the usual `className` prop, but you can override many class names injected to the inner components by React-admin thanks to the `sx` property (as most Material UI components, see their [documentation about it](https://mui.com/material-ui/customization/how-to-customize/#overriding-nested-component-styles)). This property accepts the following subclasse:

| Rule name | Description |
| -------------------------- | -------------------------------- |
Expand Down Expand Up @@ -364,13 +364,13 @@ export const CustomerShow = () => (

## Navigating Through Records In `<Edit>` Views After Submit

Let's says users want to edit customer records and to navigate between records in the `<Edit>` view. The default react-admin behaviors causes two problems:
Let's say users want to edit customer records and to navigate between records in the `<Edit>` view. The default react-admin behaviors causes two problems:
- when they save a record the user is redirected to the `<List>` view,
- when they navigate to another record, the form is not saved.

Thanks to React-admin components, you can solve these issues by using
- [`redirect` prop from `<Edit>`](Edit.md#redirect) with which you can specify the redirect to apply. Here we will choose to stay on the page rather than being redirected to the list view.
- [`warnWhenUnsavedChanges` from `Form`](Form.md#warnwhenunsavedchanges) that will triggers an alert if the user tries to change page while the record has not been saved.
- [`warnWhenUnsavedChanges` from `Form`](Form.md#warnwhenunsavedchanges) that will trigger an alert if the user tries to change page while the record has not been saved.

{% raw %}
```tsx
Expand All @@ -393,7 +393,7 @@ export const CustomerEdit = () => (

## Performance

This components tries to avoid fetching the API to determine the previous and next item link. It does so by inspecting the cache of the list view. If the user has already rendered the list view for the current resource, `<PrevNextButtons>` will not need to call the `dataProvider` at all.
This component tries to avoid fetching the API to determine the previous and next item link. It does so by inspecting the cache of the list view. If the user has already rendered the list view for the current resource, `<PrevNextButtons>` will not need to call the `dataProvider` at all.

However, if the user has never displayed a list view, or if the current record is outside of the boundaries of the list view cache, `<PrevNextButtons>` will have to **fetch the entire list of records** for the current resource to determine the previous and next item link. This can be costly in terms of server and network performance.

Expand Down
2 changes: 1 addition & 1 deletion docs/ReferenceInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ The name of the reference resource. For instance, in a contact form, if you want
<ReferenceInput source="company_id" reference="companies" />
```

`<ReferenceInput>` will use the reference resource [`recordRepresentation`](./Resource.md#recordrepresentation) to display the selected record and the list of possible records. So for instance, if the `companies` resource is defined as follow:
`<ReferenceInput>` will use the reference resource [`recordRepresentation`](./Resource.md#recordrepresentation) to display the selected record and the list of possible records. So for instance, if the `companies` resource is defined as follows:

```jsx
<Resource name="companies" recordRepresentation="name" />
Expand Down
4 changes: 2 additions & 2 deletions docs/ReferenceManyToManyInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const BandEdit = () => (

## `children`

`<ReferenceManyToManyInput>` expects an _select_ component as child, i.e. a component working inside a `ChoiceContext`. That means you can use a [`<SelectArrayInput>`](./SelectArrayInput.md), or a [`<AutocompleteArrayInput>`](./AutocompleteArrayInput.md).
`<ReferenceManyToManyInput>` expects a _select_ component as child, i.e. a component working inside a `ChoiceContext`. That means you can use a [`<SelectArrayInput>`](./SelectArrayInput.md), or a [`<AutocompleteArrayInput>`](./AutocompleteArrayInput.md).

For instance, to allow user to choose `performances` using a `<SelectArrayInput>` instead of an `<AutocompleteArrayInput>`, you can write:

Expand Down Expand Up @@ -392,4 +392,4 @@ dataProvider.create('performances', {
dataProvider.create('performances', {
data: { band_id: 123, venue_id: 3 },
});
```
```
4 changes: 2 additions & 2 deletions docs/Show.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export const UsersShow = () => (

## `sx`: CSS API

The `<Show>` component accepts the usual `className` prop but you can override many class names injected to the inner components by React-admin thanks to the `sx` property (see [the `sx` documentation](./SX.md) for syntax and examples). This property accepts the following subclasses:
The `<Show>` component accepts the usual `className` prop, but you can override many class names injected to the inner components by React-admin thanks to the `sx` property (see [the `sx` documentation](./SX.md) for syntax and examples). This property accepts the following subclasses:

| Rule name | Description |
|------------------| ------------------------------------------------------------- |
Expand Down Expand Up @@ -631,4 +631,4 @@ export const PostShow = () => (
</div>
</ShowBase>
);
```
```
2 changes: 1 addition & 1 deletion docs/SimpleShowLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const PostShow = () => (

## `sx`: CSS API

The `<SimpleShowLayout>` component accepts the usual `className` prop but you can override many class names injected to the inner components by React-admin thanks to the `sx` property (see [the `sx` documentation](./SX.md) for syntax and examples). This property accepts the following subclasses:
The `<SimpleShowLayout>` component accepts the usual `className` prop, but you can override many class names injected to the inner components by React-admin thanks to the `sx` property (see [the `sx` documentation](./SX.md) for syntax and examples). This property accepts the following subclasses:

| Rule name | Description |
|-------------------------------|---------------------------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion docs/SolarLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ If you don't have an `authProvider` but have configured a dark theme or your `i1

Besides, this default menu has a secondary sliding panel.

If you have an `authProvider`, this secondary sliding panel will show the user full name when available from the `authProvider.getIdentity` function and a logout button. If the user full name is not available, it will display a the logout button only.
If you have an `authProvider`, this secondary sliding panel will show the user full name when available from the `authProvider.getIdentity` function and a logout button. If the user full name is not available, it will display a logout button only.

If you have configured a dark theme, the secondary sliding panel will show a button to toggle it.

Expand Down
18 changes: 9 additions & 9 deletions docs/StackedFilters.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ const postListFilters: FiltersConfig = {

## Props

| Prop | Required | Type | Default | Description |
| ------------------------- | ------------- | -------- | --------------- | ------------------------------------------------------ |
| `config` | Required | object | - | The stacked filters configuration |
| `BadgeProps` | Optional | object | - | Additional props to pass to the [MUI Badge](https://mui.com/material-ui/react-badge/) element |
| `ButtonProps` | Optional | object | - | Additional props to pass to the [Button](./Buttons.html#button) element |
| `className` | Optional | string | - | Additional CSS class applied on the root component |
| Prop | Required | Type | Default | Description |
| ------------------------- | ------------- | -------- | --------------- |---------------------------------------------------------------------------------------------------|
| `config` | Required | object | - | The stacked filters configuration |
| `BadgeProps` | Optional | object | - | Additional props to pass to the [MUI Badge](https://mui.com/material-ui/react-badge/) element |
| `ButtonProps` | Optional | object | - | Additional props to pass to the [Button](./Buttons.md#button) element |
| `className` | Optional | string | - | Additional CSS class applied on the root component |
| `PopoverProps` | Optional | Object | - | Additional props to pass to the [MUI Popover](https://mui.com/material-ui/react-popover/) element |
| `StackedFilters FormProps` | Optional | Object | - | Additional props to pass to the [StackedFiltersForm](#stackedfiltersform) element |
| `sx` | Optional | Object | - | An object containing the MUI style overrides to apply to the root component |
| `StackedFilters FormProps` | Optional | Object | - | Additional props to pass to the [StackedFiltersForm](#stackedfiltersform) element |
| `sx` | Optional | Object | - | An object containing the MUI style overrides to apply to the root component |

## `BadgeProps`

Expand All @@ -173,7 +173,7 @@ export const MyStackedFilter = () => (

## `ButtonProps`

This prop lets you pass additional props for the [Button](./Buttons.html#button).
This prop lets you pass additional props for the [Button](./Buttons.md#button).

{% raw %}
```tsx
Expand Down
2 changes: 1 addition & 1 deletion docs/TabbedShowLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ const PostShow = () => (

## `sx`: CSS API

The `<TabbedShowLayout>` component accepts the usual `className` prop but you can override many class names injected to the inner components by React-admin thanks to the `sx` property (see [the `sx` documentation](./SX.md) for syntax and examples). This property accepts the following subclasses:
The `<TabbedShowLayout>` component accepts the usual `className` prop, but you can override many class names injected to the inner components by React-admin thanks to the `sx` property (see [the `sx` documentation](./SX.md) for syntax and examples). This property accepts the following subclasses:

| Rule name | Description |
|---------------------------------| ---------------------------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion docs/useShowController.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This custom Show view has no action buttons - it's up to you to add them in pure
|------------------|----------|-------------------|---------|--------------------------------------------------------
| `disable Authentication` | Optional | `boolean` | | Set to `true` to disable the authentication check.
| `id` | Optional | `string` | | The record identifier. If not provided, it will be deduced from the URL.
| `queryOptions` | Optional | `object` | | The options to pass to the [`useQuery`](./Actions.mdl#usequery-and-usemutation) hook.
| `queryOptions` | Optional | `object` | | The options to pass to the [`useQuery`](./Actions.md#usequery-and-usemutation) hook.
| `resource` | Optional | `string` | | The resource name, e.g. `posts`

## `disableAuthentication`
Expand Down

0 comments on commit f6c637a

Please sign in to comment.