Skip to content

Commit

Permalink
Merge pull request #8414 from marmelab/fix-redirect-prop
Browse files Browse the repository at this point in the history
Fix remove old record prop references from Form components
  • Loading branch information
slax57 authored Nov 22, 2022
2 parents 99a568f + a424084 commit 6558473
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
6 changes: 0 additions & 6 deletions packages/ra-ui-materialui/src/form/SimpleForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { Toolbar } from './Toolbar';
* @prop {ReactElement[]} children Input elements
* @prop {Object} defaultValues
* @prop {Function} validate
* @prop {string} redirect
* @prop {ReactElement} toolbar The element displayed at the bottom of the form, containing the SaveButton
*
* @param {Props} props
Expand Down Expand Up @@ -62,11 +61,6 @@ SimpleForm.propTypes = {
defaultValues: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
// @ts-ignore
record: PropTypes.object,
redirect: PropTypes.oneOfType([
PropTypes.string,
PropTypes.bool,
PropTypes.func,
]),
toolbar: PropTypes.oneOfType([PropTypes.element, PropTypes.oneOf([false])]),
validate: PropTypes.func,
};
Expand Down
15 changes: 1 addition & 14 deletions packages/ra-ui-materialui/src/form/TabbedForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@ import {
HtmlHTMLAttributes,
} from 'react';
import PropTypes from 'prop-types';
import {
Form,
FormProps,
MutationMode,
RaRecord,
RedirectionSideEffect,
} from 'ra-core';
import { Form, FormProps, MutationMode, RaRecord } from 'ra-core';
import get from 'lodash/get';

import { TabbedFormView, TabbedFormViewProps } from './TabbedFormView';
Expand Down Expand Up @@ -77,7 +71,6 @@ import { useFormRootPath } from './useFormRootPath';
* @prop {ReactElement[]} FormTab elements
* @prop {Object} defaultValues
* @prop {Function} validate
* @prop {string} redirect
* @prop {ReactElement} toolbar The element displayed at the bottom of the form, containing the SaveButton
*
* @param {Props} props
Expand Down Expand Up @@ -122,11 +115,6 @@ TabbedForm.propTypes = {
mutationMode: PropTypes.oneOf(['pessimistic', 'optimistic', 'undoable']),
// @ts-ignore
record: PropTypes.object,
redirect: PropTypes.oneOfType([
PropTypes.string,
PropTypes.bool,
PropTypes.func,
]),
saving: PropTypes.bool,
validate: PropTypes.func,
};
Expand All @@ -144,7 +132,6 @@ export interface TabbedFormProps
formRootPathname?: string;
mutationMode?: MutationMode;
record?: RaRecord;
redirect?: RedirectionSideEffect;
resource?: string;
syncWithLocation?: boolean;
tabs?: ReactElement;
Expand Down

0 comments on commit 6558473

Please sign in to comment.