Skip to content

Commit

Permalink
fix: FocusLock compoenents does not have name. Used named components …
Browse files Browse the repository at this point in the history
…inside forwardRefs
  • Loading branch information
theKashey committed Jun 26, 2020
1 parent 188445c commit a2d781d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions src/Combination.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ const RequireSideCar = (props) => {
};
*/

const FocusLockCombination = React.forwardRef((props, ref) => (
<FocusLockUI
sideCar={FocusTrap}
ref={ref}
{...props}
/>
));
const FocusLockCombination = React.forwardRef(function FocusLockUICombination(props, ref) {
return (
<FocusLockUI
sideCar={FocusTrap}
ref={ref}
{...props}
/>
)
});

const { sideCar, ...propTypes } = FocusLockUI.propTypes || {};

Expand Down
2 changes: 1 addition & 1 deletion src/Lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { mediumFocus, mediumBlur, mediumSidecar } from './medium';

const emptyArray = [];

const FocusLock = React.forwardRef((props, parentRef) => {
const FocusLock = React.forwardRef(function FocusLockUI(props, parentRef) {
const [realObserved, setObserved] = React.useState();
const observed = React.useRef();
const isActive = React.useRef(false);
Expand Down

0 comments on commit a2d781d

Please sign in to comment.