Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjusted documentation for the linkType property found in SimpleList and SingleFieldList #8171

Merged
merged 6 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
9 changes: 8 additions & 1 deletion docs/SimpleList.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,14 @@ export const PostList = () => (
);
```

Setting the `linkType` prop to `false` (boolean, not string) removes the link in all list items.

`linkType` accepts the following options:
riexn marked this conversation as resolved.
Show resolved Hide resolved

* `linkType="edit"`: links to the edit page. This is the default behavior.
* `linkType="show"`: links to the show page.
* `linkType={false}`: removes the link.
riexn marked this conversation as resolved.
Show resolved Hide resolved



## `primaryText`

Expand Down
8 changes: 8 additions & 0 deletions docs/SingleFieldList.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ The `<SingleFieldList>` items link to the edition page by default. You can set t
</ReferenceArrayField>
```


`linkType` accepts the following options:
riexn marked this conversation as resolved.
Show resolved Hide resolved

* `linkType="edit"`: links to the edit page. This is the default behavior.
* `linkType="show"`: links to the show page.
* `linkType={false}`: removes the link.
riexn marked this conversation as resolved.
Show resolved Hide resolved


## `sx`: CSS API

The `<SingleFieldList>` component accepts the usual `className` prop. You can also override the styles of the inner components thanks to the `sx` property. This property accepts the following subclasses:
Expand Down