@onehat/ui 0.3.370 → 0.3.371

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.370",
3
+ "version": "0.3.371",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -1,3 +1,4 @@
1
+ import { forwardRef } from 'react';
1
2
  import Inflector from 'inflector-js';
2
3
  import inArray from '../../Functions/inArray.js';
3
4
  import {
@@ -81,7 +82,7 @@ export function canUser(permission, modelToCheck = null) {
81
82
  }
82
83
 
83
84
  export default function withPermissions(WrappedComponent, forceUsePermissions = false) {
84
- return (props) => {
85
+ return forwardRef((props, ref) => {
85
86
 
86
87
  if (!props.usePermissions && !forceUsePermissions) {
87
88
  return <WrappedComponent {...props} />;
@@ -115,5 +116,5 @@ export default function withPermissions(WrappedComponent, forceUsePermissions =
115
116
  canUser={canUserDecorator}
116
117
  showPermissionsError={showPermissionsError}
117
118
  />;
118
- };
119
+ });
119
120
  }