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

Fix <FileInput> and <ImageInput> clone their child #8052

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

thibault-barrat
Copy link
Contributor

Fixes #7877

@fzaninotto fzaninotto merged commit 4302137 into master Aug 9, 2022
@fzaninotto fzaninotto deleted the 7877-fileinput-cloneelement branch August 9, 2022 09:06
@fzaninotto
Copy link
Member

Thanks!

@fzaninotto fzaninotto added this to the 4.2.7 milestone Aug 9, 2022
@fzaninotto fzaninotto changed the title Fix use custom preview component for FileInput and ImageInput Fix <FileInput> and <ImageInput> clone their child Aug 9, 2022
@@ -195,10 +192,9 @@ export const FileInput = (props: FileInputProps) => {
onRemove={onRemove(file)}
className={FileInputClasses.removeButton}
>
{cloneElement(childrenElement as ReactElement, {
record: file,
className: FileInputClasses.preview,
Copy link
Contributor

@WiXSL WiXSL Aug 9, 2022

Choose a reason for hiding this comment

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

I just notice that with this change, you are removing the use of & .RaFileInput-preview which is still part of the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your remark. We will remove it from the docs in an other PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImageInput clones its child
3 participants