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/warnings in component: UValidatorComponent #85

Merged
merged 3 commits into from
Nov 17, 2021

Conversation

dfrancisc
Copy link
Collaborator

@dfrancisc dfrancisc commented Nov 10, 2021

Material ui Menu component throws the warning error:

Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Check the render method of ForwardRef. in Menu (created by ForwardRef)

In order to avoid this problem, a new component using ForwardRef is needed. You can check mui/material-ui#15903).
Although, another workaround seems to be effective as well . Which is adding a box within the root element and its child

EDIT: The UMenu component is not longer needed. I just removed it from the PR. The warning can be resolved by wrapping Menu content with a <div> tag

@dfrancisc dfrancisc self-assigned this Nov 10, 2021
@dfrancisc dfrancisc requested a review from merlos November 10, 2021 18:09
@dfrancisc dfrancisc changed the title Fix/warnings in components. Add UMenu component to avoid warning Fix/warnings in component Nov 17, 2021
@dfrancisc dfrancisc changed the title Fix/warnings in component Fix/warnings in component: UValidatorComponent Nov 17, 2021
@merlos merlos merged commit 4be2bb9 into master Nov 17, 2021
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