Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Typescript] Add missing classes prop on SimpleFormIterator #5890

Merged
merged 2 commits into from
Feb 11, 2021

Conversation

ValentinH
Copy link
Contributor

@ValentinH ValentinH commented Feb 9, 2021

In order to customise the layout of a form in SimpleFormIterator, I need to use the classes props. It works but the TS definition was not allowing it.

This simply adds the classes prop.

In order to customise the layout of a form in SimpleFormIterator, I need to use the `classes` props. It works but the TS definition was not allowing it.

This simply adds the `classes` prop.
@@ -319,6 +319,7 @@ export interface SimpleFormIteratorProps
extends Partial<Omit<FieldArrayRenderProps<any, HTMLElement>, 'meta'>> {
addButton?: ReactElement;
basePath?: string;
classes?: Partial<ReturnType<typeof useStyles>>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind using the ClassesOverride type? It can be imported from the types.ts file

classes: ClassesOverride<typeof useStyles>;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure no problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@djhi djhi added this to the 3.12.2 milestone Feb 11, 2021
@djhi djhi merged commit 617a4b2 into marmelab:master Feb 11, 2021
@ValentinH ValentinH deleted the patch-2 branch February 11, 2021 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants