How to use the focus-lock/constants.FOCUS_AUTO function in focus-lock

To help you get started, we’ve selected a few focus-lock examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github theKashey / react-focus-lock / src / MoveFocusInside.js View on Github external
if (!disabled.current && observed) {
        if (!car.focusInside(observed)) {
          car.moveFocusInside(observed, null);
        }
      }
    });
  };

  React.useEffect(() => {
    disabled.current = isDisabled;
    moveFocus();
  }, [isDisabled]);

  return (
    <div>
      {children}
    </div>
  );
}