Skip to content

Commit

Permalink
ToggleGroupControl: Fix arrow key navigation in RTL (#65735)
Browse files Browse the repository at this point in the history
* ToggleGroupControl: Fix arrow key navigation in RTL

* Add changelog

Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
3 people authored and gutenbergplugin committed Sep 30, 2024
1 parent bcba55a commit aa59d85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

- `ToolsPanel`: atomic one-step state update when (un)registering panels ([#65564](https://github.com/WordPress/gutenberg/pull/65564)).
- `Navigator`: fix `isInitial` logic ([#65527](https://github.com/WordPress/gutenberg/pull/65527)).
- `ToggleGroupControl`: Fix arrow key navigation in RTL ([#65735](https://github.com/WordPress/gutenberg/pull/65735)).

## 28.8.0 (2024-09-19)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useStoreState } from '@ariakit/react';
*/
import { useInstanceId } from '@wordpress/compose';
import { forwardRef, useMemo } from '@wordpress/element';
import { isRTL } from '@wordpress/i18n';

/**
* Internal dependencies
Expand Down Expand Up @@ -65,6 +66,7 @@ function UnforwardedToggleGroupControlAsRadioGroup(
defaultValue,
value,
setValue: wrappedOnChangeProp,
rtl: isRTL(),
} );

const selectedValue = useStoreState( radio, 'value' );
Expand Down

0 comments on commit aa59d85

Please sign in to comment.