Skip to content

Commit

Permalink
Merge pull request #5386 from nickwaelkens/fix/tab-path-type
Browse files Browse the repository at this point in the history
Add missing "path" type for Tab component
  • Loading branch information
fzaninotto authored Oct 12, 2020
2 parents 84eff69 + 1671f16 commit 8a4077b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ra-ui-materialui/src/detail/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Labeled from '../input/Labeled';
*
* - label: The string displayed for each tab
* - icon: The icon to show before the label (optional). Must be a component.
* - path: The string used for custom urls
*
* @example
* // in src/posts.js
Expand All @@ -30,7 +31,7 @@ import Labeled from '../input/Labeled';
* <TextField source="title" />
* <TextField source="subtitle" />
* </Tab>
* <Tab label="Metadata" icon={<PersonIcon />}>
* <Tab label="Metadata" icon={<PersonIcon />} path="metadata">
* <TextField source="category" />
* </Tab>
* </TabbedShowLayout>
Expand Down Expand Up @@ -124,6 +125,7 @@ Tab.propTypes = {
context: PropTypes.oneOf(['header', 'content']),
icon: PropTypes.element,
label: PropTypes.string.isRequired,
path: PropTypes.string,
value: PropTypes.string,
};

Expand All @@ -135,6 +137,7 @@ export interface TabProps extends MuiTabProps {
className?: string;
icon?: ReactElement;
label: string;
path?: string;
record?: Record;
resource?: string;
value?: string;
Expand Down

0 comments on commit 8a4077b

Please sign in to comment.