diff --git a/packages/demo/src/apps/SettingsMenu/Slider.tsx b/packages/demo/src/apps/SettingsMenu/Slider.tsx index 5ed9bbd..c4479d3 100644 --- a/packages/demo/src/apps/SettingsMenu/Slider.tsx +++ b/packages/demo/src/apps/SettingsMenu/Slider.tsx @@ -1,7 +1,7 @@ import * as React from "react" import { useState } from "react" import { motion } from "framer-motion" -import { Direction, Focusable, SyntheticGamepadKeyEvent } from "react-sunbeam" +import { Direction, Focusable } from "react-sunbeam" import { Colors, Typography } from "../../styles.js" import { isCancel, isLeft, isRight, isSelect } from "../../keyPressUtils.js" diff --git a/packages/react-sunbeam/package.json b/packages/react-sunbeam/package.json index 6c57ba1..80c03b2 100644 --- a/packages/react-sunbeam/package.json +++ b/packages/react-sunbeam/package.json @@ -1,6 +1,6 @@ { "name": "react-sunbeam", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Spatial navigation and focus management for React", "keywords": [ "spatial-navigation", diff --git a/packages/react-sunbeam/src/focus/FocusableNode.ts b/packages/react-sunbeam/src/focus/FocusableNode.ts index 136f344..7064ac1 100644 --- a/packages/react-sunbeam/src/focus/FocusableNode.ts +++ b/packages/react-sunbeam/src/focus/FocusableNode.ts @@ -31,7 +31,7 @@ export class FocusableNode implements IFocusableNode { customGetPreferredChild?: CustomGetPreferredChildFn lock: Direction[] | Direction | undefined }) { - focusKey = focusKey ?? `focusable:${randomId()}` + focusKey = focusKey || `focusable:${randomId()}` this.focusKey = focusKey this.path = [...parentPath, focusKey] this.getBoundingBox = getBoundingBox