Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
k-egor-smirnov committed Oct 7, 2022
1 parent 44a5707 commit e3f8610
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Group/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const GroupComponent = ({
mode,
padding = "m",
sizeX,
tabIndex: tabIndexProp,
...restProps
}: GroupProps) => {
const { isInsideModal } = React.useContext(ModalRootContext);
Expand All @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion src/components/TabsItem/TabsItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const TabsItem = ({
after,
selected = false,
role = "tab",
tabIndex: tabIndexProp,
...restProps
}: TabsItemProps) => {
const platform = usePlatform();
Expand Down Expand Up @@ -84,7 +85,7 @@ export const TabsItem = ({
}
}

let tabIndex = restProps.tabIndex;
let tabIndex = tabIndexProp;
if (isTabFlow && tabIndex === undefined) {
tabIndex = selected ? 0 : -1;
}
Expand Down

0 comments on commit e3f8610

Please sign in to comment.