From e3f8610d2db5270a65ef9a8d53cebb2323a7460b Mon Sep 17 00:00:00 2001 From: Egor Smirnov Date: Fri, 7 Oct 2022 13:10:11 +0300 Subject: [PATCH] review fixes --- src/components/Group/Group.tsx | 4 ++-- src/components/TabsItem/TabsItem.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Group/Group.tsx b/src/components/Group/Group.tsx index 0a70e50ab2..3ac1425af1 100644 --- a/src/components/Group/Group.tsx +++ b/src/components/Group/Group.tsx @@ -53,6 +53,7 @@ const GroupComponent = ({ mode, padding = "m", sizeX, + tabIndex: tabIndexProp, ...restProps }: GroupProps) => { const { isInsideModal } = React.useContext(ModalRootContext); @@ -77,8 +78,7 @@ const GroupComponent = ({ ); } - const tabIndex = - isTabPanel && restProps.tabIndex === undefined ? 0 : restProps.tabIndex; + const tabIndex = isTabPanel && tabIndexProp === undefined ? 0 : tabIndexProp; let separatorElement = null; diff --git a/src/components/TabsItem/TabsItem.tsx b/src/components/TabsItem/TabsItem.tsx index 52f982c01b..f623c2e54f 100644 --- a/src/components/TabsItem/TabsItem.tsx +++ b/src/components/TabsItem/TabsItem.tsx @@ -48,6 +48,7 @@ export const TabsItem = ({ after, selected = false, role = "tab", + tabIndex: tabIndexProp, ...restProps }: TabsItemProps) => { const platform = usePlatform(); @@ -84,7 +85,7 @@ export const TabsItem = ({ } } - let tabIndex = restProps.tabIndex; + let tabIndex = tabIndexProp; if (isTabFlow && tabIndex === undefined) { tabIndex = selected ? 0 : -1; }