Skip to content

Commit

Permalink
Remove empty interfaces and fix 2 potential bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pemoreau committed Oct 10, 2019
1 parent 8136185 commit 62a686a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 3 additions & 1 deletion packages/ra-ui-materialui/src/form/SimpleForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ const SimpleForm = ({ initialValues, defaultValue, saving, ...props }) => {

const submit = values => {
const finalRedirect =
typeof redirect === undefined ? props.redirect : redirect.current;
typeof redirect.current === undefined
? props.redirect
: redirect.current;
const finalValues = sanitizeEmptyValues(finalInitialValues, values);

props.save(finalValues, finalRedirect);
Expand Down
4 changes: 3 additions & 1 deletion packages/ra-ui-materialui/src/form/TabbedForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ const TabbedForm = ({ initialValues, defaultValue, saving, ...props }) => {

const submit = values => {
const finalRedirect =
typeof redirect === undefined ? props.redirect : redirect.current;
typeof redirect.current === undefined
? props.redirect
: redirect.current;
const finalValues = sanitizeEmptyValues(finalInitialValues, values);

props.save(finalValues, finalRedirect);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import InputHelperText from './InputHelperText';
import AutocompleteSuggestionList from './AutocompleteSuggestionList';
import AutocompleteSuggestionItem from './AutocompleteSuggestionItem';

interface Props {}

interface Options {
suggestionsContainerProps?: any;
labelProps?: any;
Expand Down Expand Up @@ -93,7 +91,7 @@ interface Options {
* <AutocompleteArrayInput source="author_id" options={{ fullWidthInput: true }} />
*/
const AutocompleteArrayInput: FunctionComponent<
Props & InputProps<TextFieldProps & Options> & DownshiftProps<any>
InputProps<TextFieldProps & Options> & DownshiftProps<any>
> = ({
allowEmpty,
classes: classesOverride,
Expand Down
4 changes: 1 addition & 3 deletions packages/ra-ui-materialui/src/input/AutocompleteInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import InputHelperText from './InputHelperText';
import AutocompleteSuggestionList from './AutocompleteSuggestionList';
import AutocompleteSuggestionItem from './AutocompleteSuggestionItem';

interface Props {}

interface Options {
suggestionsContainerProps?: any;
labelProps?: any;
Expand Down Expand Up @@ -93,7 +91,7 @@ interface Options {
* <AutocompleteInput source="author_id" options={{ fullWidthInput: true }} />
*/
const AutocompleteInput: FunctionComponent<
Props & InputProps<TextFieldProps & Options> & DownshiftProps<any>
InputProps<TextFieldProps & Options> & DownshiftProps<any>
> = ({
allowEmpty,
classes: classesOverride,
Expand Down

0 comments on commit 62a686a

Please sign in to comment.