Skip to content

Commit

Permalink
RemoveClassNameMap in ReferenceField
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Aug 25, 2020
1 parent 88ede7c commit d8e75ce
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/ra-ui-materialui/src/field/ReferenceField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import {
import LinearProgress from '../layout/LinearProgress';
import Link from '../Link';
import sanitizeRestProps from './sanitizeRestProps';
import { ClassNameMap } from '@material-ui/styles';
import { FieldProps, fieldPropTypes, InjectedFieldProps } from './types';
import { ClassesOverride } from '../types';

/**
* Fetch reference record, and delegate rendering to child component.
Expand Down Expand Up @@ -131,7 +131,7 @@ ReferenceField.defaultProps = {

export interface ReferenceFieldProps extends FieldProps, InjectedFieldProps {
children: ReactElement;
classes?: Partial<ClassNameMap<ReferenceFieldClassKey>>;
classes?: ClassesOverride<typeof useStyles>;
reference: string;
resource?: string;
source: string;
Expand Down Expand Up @@ -237,13 +237,11 @@ ReferenceFieldView.propTypes = {
translateChoice: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
};

export type ReferenceFieldClassKey = 'link';

export interface ReferenceFieldViewProps
extends FieldProps,
InjectedFieldProps,
UseReferenceProps {
classes?: Partial<ClassNameMap<ReferenceFieldClassKey>>;
classes?: ClassesOverride<typeof useStyles>;
reference: string;
resource?: string;
translateChoice?: Function | boolean;
Expand Down

0 comments on commit d8e75ce

Please sign in to comment.