Tree Select Control: Use enter button for selection (#41480)
* enable enter to select * Add changefile(s) from automation for the following project(s): @woocommerce/components --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
251812232d
commit
3c703d3718
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: update
|
||||
|
||||
Improve keyboard interaction of Tree Select Control component.
|
|
@ -331,6 +331,11 @@ const TreeSelectControl = ( {
|
|||
|
||||
if ( ENTER === event.key ) {
|
||||
setTreeVisible( true );
|
||||
|
||||
if ( event.target.type === 'checkbox' ) {
|
||||
event.target.click();
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue