From 115aa2918e2659d605f4e44e029fc0c6a60c2a41 Mon Sep 17 00:00:00 2001 From: Deyner Lezcano <> Date: Wed, 10 Nov 2021 09:28:31 -0500 Subject: [PATCH 1/3] fix prop type for value in UValidatorComponent --- src/components/UValidatorComponent/UValidatorComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/UValidatorComponent/UValidatorComponent.js b/src/components/UValidatorComponent/UValidatorComponent.js index 867ece0ab..0385ee38a 100644 --- a/src/components/UValidatorComponent/UValidatorComponent.js +++ b/src/components/UValidatorComponent/UValidatorComponent.js @@ -57,5 +57,5 @@ UValidatorComponent.propTypes = { /** Allow to use required validator in any validation trigger, not only form submit. */ withRequiredValidator: PropTypes.bool, /** you must provide this prop, it will be used only for validation. */ - value: PropTypes.bool.isRequired, + value: PropTypes.any.isRequired, } From a4a412dd0b76d236a7fc33c3680782a06ade465e Mon Sep 17 00:00:00 2001 From: Deyner Lezcano <> Date: Wed, 10 Nov 2021 13:05:46 -0500 Subject: [PATCH 2/3] add new component UMenu to avoid warning message --- src/components/UMenu/UMenu.js | 23 +++++++++++++++++++++++ src/components/UMenu/UMenu.md | 14 ++++++++++++++ src/components/UMenu/index.js | 1 + 3 files changed, 38 insertions(+) create mode 100644 src/components/UMenu/UMenu.js create mode 100644 src/components/UMenu/UMenu.md create mode 100644 src/components/UMenu/index.js diff --git a/src/components/UMenu/UMenu.js b/src/components/UMenu/UMenu.js new file mode 100644 index 000000000..4a3b25907 --- /dev/null +++ b/src/components/UMenu/UMenu.js @@ -0,0 +1,23 @@ +import React from 'react' +import Menu from '@material-ui/core/Menu' + +/** + * UMenu encapsulates Menu component from material ui + * Original component was written using class which throws a 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(Menu)`. + * ***** + * For these scenarios, using React.forwardRef is recommended.(e.g .https://github.com/mui-org/material-ui/issues/15903) + * Another solution is wrapping the children withing a container(div). This one seems to be + * working for the current version + */ +const UMenu = React.forwardRef((props, ref) => { + return ( + +
{props.children}
+
+ ) +}) + +export default UMenu diff --git a/src/components/UMenu/UMenu.md b/src/components/UMenu/UMenu.md new file mode 100644 index 000000000..1a6a00cec --- /dev/null +++ b/src/components/UMenu/UMenu.md @@ -0,0 +1,14 @@ +```jsx +import React from 'react' +// import Menu from '@material-ui/core/Menu' + +// export default UMenu = React.forwardRef((props, ref) => { + +// return ( +; +
{props.children}
+
+ +// ) +// }) +``` diff --git a/src/components/UMenu/index.js b/src/components/UMenu/index.js new file mode 100644 index 000000000..2728e61ef --- /dev/null +++ b/src/components/UMenu/index.js @@ -0,0 +1 @@ +export { default } from './UMenu' From b09c852c1ea65d6fea7699653696ad79c53b9848 Mon Sep 17 00:00:00 2001 From: Deyner Lezcano <> Date: Wed, 17 Nov 2021 08:57:44 -0500 Subject: [PATCH 3/3] remove component UMenu --- src/components/UMenu/UMenu.js | 23 ----------------------- src/components/UMenu/UMenu.md | 14 -------------- src/components/UMenu/index.js | 1 - 3 files changed, 38 deletions(-) delete mode 100644 src/components/UMenu/UMenu.js delete mode 100644 src/components/UMenu/UMenu.md delete mode 100644 src/components/UMenu/index.js diff --git a/src/components/UMenu/UMenu.js b/src/components/UMenu/UMenu.js deleted file mode 100644 index 4a3b25907..000000000 --- a/src/components/UMenu/UMenu.js +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react' -import Menu from '@material-ui/core/Menu' - -/** - * UMenu encapsulates Menu component from material ui - * Original component was written using class which throws a 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(Menu)`. - * ***** - * For these scenarios, using React.forwardRef is recommended.(e.g .https://github.com/mui-org/material-ui/issues/15903) - * Another solution is wrapping the children withing a container(div). This one seems to be - * working for the current version - */ -const UMenu = React.forwardRef((props, ref) => { - return ( - -
{props.children}
-
- ) -}) - -export default UMenu diff --git a/src/components/UMenu/UMenu.md b/src/components/UMenu/UMenu.md deleted file mode 100644 index 1a6a00cec..000000000 --- a/src/components/UMenu/UMenu.md +++ /dev/null @@ -1,14 +0,0 @@ -```jsx -import React from 'react' -// import Menu from '@material-ui/core/Menu' - -// export default UMenu = React.forwardRef((props, ref) => { - -// return ( -; -
{props.children}
-
- -// ) -// }) -``` diff --git a/src/components/UMenu/index.js b/src/components/UMenu/index.js deleted file mode 100644 index 2728e61ef..000000000 --- a/src/components/UMenu/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './UMenu'