From 156db8c3fba034a8488fcb2dd49e061b1d1c2d48 Mon Sep 17 00:00:00 2001 From: Michal Muzyk Date: Thu, 16 May 2024 14:20:33 +0200 Subject: [PATCH] fix: split - only amount input is focusable via tab key --- src/components/SelectionList/BaseListItem.tsx | 1 + src/components/SelectionList/types.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index 5876e476afa2..f5e565504354 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -82,6 +82,7 @@ function BaseListItem({ id={keyForList ?? ''} style={pressableStyle} onFocus={onFocus} + tabIndex={item.tabIndex} > {typeof children === 'function' ? children(hovered) : children} diff --git a/src/components/SelectionList/types.ts b/src/components/SelectionList/types.ts index 79e47e4aa4d7..07212facc6b8 100644 --- a/src/components/SelectionList/types.ts +++ b/src/components/SelectionList/types.ts @@ -125,6 +125,9 @@ type ListItem = { /** Whether the brick road indicator should be shown */ brickRoadIndicator?: BrickRoad | '' | null; + + /** Whether item pressable wrapper should be focusable */ + tabIndex?: 0 | -1; }; type TransactionListItemType = ListItem &