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

Sanitize emptyText, enableGetChoices @ SAI #7015

Merged
merged 2 commits into from
Jan 27, 2022

Conversation

ZachSelindh
Copy link
Contributor

When using a SelectArrayInput as a child of a ReferenceArrayInput, DOM errors will be thrown for the props "emptyText" and "enableGetChoices". This commit sanitizes those props before they are passed to the FormControl component, which triggers the DOM error.

@vercel vercel bot temporarily deployed to Preview – react-admin December 20, 2021 16:43 Inactive
@vercel vercel bot temporarily deployed to Preview – react-admin-storybook December 20, 2021 16:43 Inactive
@vercel vercel bot temporarily deployed to Preview – react-admin-storybook December 20, 2021 21:40 Inactive
@vercel vercel bot temporarily deployed to Preview – react-admin December 20, 2021 21:40 Inactive
@fzaninotto
Copy link
Member

I can't replicate the problem of DOM warnings. Can you please point to a CodeSandbox replicating the issue?

@ZachSelindh
Copy link
Contributor Author

Sure! Here's a fork that shows the issue using a new "Subtitle" input with a ReferenceArrayInput and SelectArrayInput.

https://codesandbox.io/s/damp-river-jqr32?file=/src/posts/PostCreate.tsx

@WiXSL WiXSL added the RFR Ready For Review label Jan 17, 2022
@WiXSL
Copy link
Contributor

WiXSL commented Jan 21, 2022

Looks ok!

@fzaninotto fzaninotto merged commit a456147 into marmelab:master Jan 27, 2022
@fzaninotto
Copy link
Member

Thanks!

@fzaninotto fzaninotto added this to the v3.19.8 milestone Jan 27, 2022
@ZachSelindh ZachSelindh deleted the sanitize-restprops-from-sai branch February 15, 2022 17:38
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.

3 participants