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

Releases: NoriginMedia/react-spatial-navigation

Updated behaviour for `onBecameFocused` and added `onBecameBlurred` callback

25 Feb 13:31
Compare
Choose a tag to compare

KeyDetails

23 Jan 08:45
Compare
Choose a tag to compare
v2.9.3

2.9.3 (#56)

Fixed issue #46 Focus jumps on wrong component

10 Dec 16:11
40fbc90
Compare
Choose a tag to compare
Bugfix layout positions (#47)

* removed setTimeout in measureLayout to avoid coordinates mismatches

* lint

* update changelog

* 2.9.2

Added method for imperative directional navigation

17 Sep 08:32
Compare
Choose a tag to compare

Before the directional navigation was only done when listening to key events, now it is possible to call navigateByDirection to perform this manually.

Avoid not needed property update

11 Sep 13:37
Compare
Choose a tag to compare

Bugfixing for ref to component in native mode

21 Aug 14:18
Compare
Choose a tag to compare

Bugfixing for ref to component in native mode

Added safety checks for component existence on Enter or Arrow press

21 Aug 13:58
Compare
Choose a tag to compare

Added safety checks for component existence on Enter or Arrow press

Added copy of "node" ref to "layout" object

21 Aug 09:55
Compare
Choose a tag to compare

Added a copy of "node" ref to "layout" to also have it onBecameFocused callback. Useful for lazy measuring of the layout by the node ref, e.g. in native environment where we don't measure all layouts on focusable component creation.

Allowed components to be focused with "setFocus" even if they have "focusable=false"

31 Jul 13:22
Compare
Choose a tag to compare

Latest feature with focusable prop had a check inside setFocus function that blocked component from being imperatively focused. This caused certain regressions, for example when you "setFocus()" on the whole page on mount. The previous logic allowed to save target focus key even if component doesn't exist yet, and then when it gets mounted, the focus was set to this component. So this check was removed to allow setting focus manually on any focusKey (even non existent ones) with setFocus.
Assuming you have full control of where you call setFocus, you can avoid setting it to components that should have focusable={false}, which you also have control of.
focusable prop now only affects "automatic" navigation logic such as directional navigation, focusing lastFocusedChild or preferredFocusChild.

Added "focusable" prop. Moved react and react-dom deps to peers.

31 Jul 11:59
Compare
Choose a tag to compare

Added

  • focusable prop that enables component as a focusable target. Default is true. Usable when you need to temporarily disable focusable behaviour on the component. E.g. disabled button state.

Changed

  • Moved react and react-dom to peer dependencies