feat(segment): add keyboard navigation, add selectOnFocus property to control selection follow focus behavior (#23590)

resolves #23520
This commit is contained in:
William Martin
2021-07-20 16:45:17 -04:00
committed by GitHub
parent 82d6275f3d
commit b6c53e539b
9 changed files with 178 additions and 34 deletions

View File

@ -2265,6 +2265,10 @@ export namespace Components {
* If `true`, the segment buttons will overflow and the user can swipe to see them. In addition, this will disable the gesture to drag the indicator between the buttons in order to swipe to see hidden buttons.
*/
"scrollable": boolean;
/**
* If `true`, navigating to an `ion-segment-button` with the keyboard will focus and select the element. If `false`, keyboard navigation will only focus the `ion-segment-button` element.
*/
"selectOnFocus": boolean;
/**
* If `true`, users will be able to swipe between segment buttons to activate them.
*/
@ -5846,6 +5850,10 @@ declare namespace LocalJSX {
* If `true`, the segment buttons will overflow and the user can swipe to see them. In addition, this will disable the gesture to drag the indicator between the buttons in order to swipe to see hidden buttons.
*/
"scrollable"?: boolean;
/**
* If `true`, navigating to an `ion-segment-button` with the keyboard will focus and select the element. If `false`, keyboard navigation will only focus the `ion-segment-button` element.
*/
"selectOnFocus"?: boolean;
/**
* If `true`, users will be able to swipe between segment buttons to activate them.
*/