Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.

Commit 602d781

Browse files
committed
Added missing ref to component for native mode on create/update
1 parent 0327274 commit 602d781

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.8.3]
8+
### Fixed
9+
- Fixed missing reference to a component in native mode
10+
711
## [2.8.2]
812
### Added
913
- Added guard checks for Enter press and Arrow press to check whether component exists

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@noriginmedia/react-spatial-navigation",
3-
"version": "2.8.2",
3+
"version": "2.8.3",
44
"description": "HOC-based Spatial Navigation (key navigation) solution for React",
55
"main": "dist/index.js",
66
"files": [

src/withFocusable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const withFocusable = ({
103103
focusable = true
104104
} = this.props;
105105

106-
const node = SpatialNavigation.isNativeMode() ? null : findDOMNode(this);
106+
const node = SpatialNavigation.isNativeMode() ? this : findDOMNode(this);
107107

108108
SpatialNavigation.addFocusable({
109109
focusKey,
@@ -125,7 +125,7 @@ const withFocusable = ({
125125
focused, realFocusKey: focusKey, onBecameFocusedHandler, preferredChildFocusKey, focusable = true
126126
} = this.props;
127127

128-
const node = SpatialNavigation.isNativeMode() ? null : findDOMNode(this);
128+
const node = SpatialNavigation.isNativeMode() ? this : findDOMNode(this);
129129

130130
SpatialNavigation.updateFocusable(focusKey, {
131131
node,

0 commit comments

Comments
 (0)