diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d6acf9..4814420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +# [1.1.4] +## Changed +- Update `parentFocusKey` when `removeFocusable` +- Fix issue with `destroy` (added `bind`) + # [1.1.3] ## Changed - `Reflect.deleteProperty` was replaced by `delete` to be es5 compliant. diff --git a/package.json b/package.json index 90bf41e..29d24c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@noriginmedia/norigin-spatial-navigation", - "version": "1.1.3", + "version": "1.1.4", "description": "React hooks based Spatial Navigation solution", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/SpatialNavigation.ts b/src/SpatialNavigation.ts index b165d46..969ce7a 100644 --- a/src/SpatialNavigation.ts +++ b/src/SpatialNavigation.ts @@ -1158,6 +1158,13 @@ class SpatialNavigationService { return; } + forEach(this.focusableComponents, (component) => { + if (component.parentFocusKey === focusKey && component.focusable) { + // eslint-disable-next-line no-param-reassign + component.parentFocusKey = parentFocusKey; + } + }); + /** * If the component was also focused at this time, focus another one */