Skip to content

Commit

Permalink
Merge pull request #3996 from WiXSL/patch-proptypes-missing
Browse files Browse the repository at this point in the history
Patch prop types missing.
  • Loading branch information
fzaninotto authored Nov 24, 2019
2 parents 6194bbb + 8ae58e5 commit 708ee6a
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/ra-ui-materialui/src/form/SimpleForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,28 @@ const SimpleForm = ({ initialValues, defaultValue, saving, ...props }) => {
);
};

SimpleForm.propTypes = {
basePath: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
defaultValue: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), // @deprecated
initialValues: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
record: PropTypes.object,
redirect: PropTypes.oneOfType([
PropTypes.string,
PropTypes.bool,
PropTypes.func,
]),
resource: PropTypes.string,
save: PropTypes.func,
saving: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]),
submitOnEnter: PropTypes.bool,
toolbar: PropTypes.element,
undoable: PropTypes.bool,
validate: PropTypes.func,
version: PropTypes.number,
};

const defaultSubscription = {
submitting: true,
pristine: true,
Expand Down
29 changes: 29 additions & 0 deletions packages/ra-ui-materialui/src/form/TabbedForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,35 @@ const TabbedForm = ({ initialValues, defaultValue, saving, ...props }) => {
);
};

TabbedForm.propTypes = {
basePath: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
classes: PropTypes.object,
defaultValue: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), // @deprecated
initialValues: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
location: PropTypes.object,
match: PropTypes.object,
record: PropTypes.object,
redirect: PropTypes.oneOfType([
PropTypes.string,
PropTypes.bool,
PropTypes.func,
]),
resource: PropTypes.string,
save: PropTypes.func, // the handler defined in the parent, which triggers the REST submission
saving: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]),
submitOnEnter: PropTypes.bool,
tabs: PropTypes.element.isRequired,
tabsWithErrors: PropTypes.arrayOf(PropTypes.string),
toolbar: PropTypes.element,
translate: PropTypes.func,
undoable: PropTypes.bool,
validate: PropTypes.func,
value: PropTypes.number,
version: PropTypes.number,
};

const defaultSubscription = {
submitting: true,
pristine: true,
Expand Down
11 changes: 11 additions & 0 deletions packages/ra-ui-materialui/src/list/DatagridLoading.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { memo } from 'react';
import PropTypes from 'prop-types';
import Table from '@material-ui/core/Table';
import TableCell from '@material-ui/core/TableCell';
import TableHead from '@material-ui/core/TableHead';
Expand Down Expand Up @@ -106,4 +107,14 @@ const DatagridLoading = ({
</Table>
);

DatagridLoading.propTypes = {
classes: PropTypes.object,
className: PropTypes.string,
expand: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]),
hasBulkActions: PropTypes.bool,
nbChildren: PropTypes.number,
nbFakeLines: PropTypes.number,
size: PropTypes.oneOf(['small', 'medium']),
};

export default memo(DatagridLoading);

0 comments on commit 708ee6a

Please sign in to comment.