Skip to content

Commit

Permalink
Merge pull request #6253 from marmelab/typescript-selectfield-typography
Browse files Browse the repository at this point in the history
[TypeScript] Fix SelectField doesn't accept Typography props
  • Loading branch information
djhi authored May 7, 2021
2 parents c498478 + 6cc5aba commit c5afe12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/crm/src/companies/CompanyCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const CompanyCard = ({ record }: { record: Company }) => {
{record.name}
</Typography>
<SelectField
// @ts-ignore
color="textSecondary"
source="sector"
choices={sectors}
Expand Down
5 changes: 3 additions & 2 deletions packages/ra-ui-materialui/src/field/SelectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FC, memo } from 'react';
import PropTypes from 'prop-types';
import get from 'lodash/get';
import { ChoicesProps, useChoices, useRecordContext } from 'ra-core';
import Typography from '@material-ui/core/Typography';
import { Typography, TypographyProps } from '@material-ui/core';

import sanitizeFieldRestProps from './sanitizeFieldRestProps';
import { PublicFieldProps, InjectedFieldProps, fieldPropTypes } from './types';
Expand Down Expand Up @@ -144,7 +144,8 @@ SelectField.propTypes = {
export interface SelectFieldProps
extends ChoicesProps,
PublicFieldProps,
InjectedFieldProps {}
InjectedFieldProps,
TypographyProps {}

SelectField.displayName = 'SelectField';

Expand Down

0 comments on commit c5afe12

Please sign in to comment.