@dhis2-ui/button 7.2.0 → 7.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -49,7 +49,9 @@ const Button = ({
49
49
  }) => {
50
50
  const ref = (0, _react.useRef)();
51
51
  (0, _react.useEffect)(() => {
52
- if (initialFocus && ref.current) ref.current.focus();
52
+ if (initialFocus && ref.current) {
53
+ ref.current.focus();
54
+ }
53
55
  }, [initialFocus, ref.current]);
54
56
 
55
57
  const handleClick = event => onClick && onClick({
@@ -29,7 +29,9 @@ export const Button = ({
29
29
  }) => {
30
30
  const ref = useRef();
31
31
  useEffect(() => {
32
- if (initialFocus && ref.current) ref.current.focus();
32
+ if (initialFocus && ref.current) {
33
+ ref.current.focus();
34
+ }
33
35
  }, [initialFocus, ref.current]);
34
36
 
35
37
  const handleClick = event => onClick && onClick({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/button",
3
- "version": "7.2.0",
3
+ "version": "7.2.4",
4
4
  "description": "UI Button",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,11 +32,11 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@dhis2/prop-types": "^3.0.0-beta.1",
35
- "@dhis2-ui/layer": "7.2.0",
36
- "@dhis2-ui/loader": "7.2.0",
37
- "@dhis2-ui/popper": "7.2.0",
38
- "@dhis2/ui-constants": "7.2.0",
39
- "@dhis2/ui-icons": "7.2.0",
35
+ "@dhis2-ui/layer": "7.2.4",
36
+ "@dhis2-ui/loader": "7.2.4",
37
+ "@dhis2-ui/popper": "7.2.4",
38
+ "@dhis2/ui-constants": "7.2.4",
39
+ "@dhis2/ui-icons": "7.2.4",
40
40
  "classnames": "^2.3.1",
41
41
  "prop-types": "^15.7.2"
42
42
  },