Skip to content

Commit

Permalink
limit amout of tabs in routed tabs skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2drum committed Aug 26, 2024
1 parent 035323c commit e5c455b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/shared/Tabs/AdaptiveTabsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const AdaptiveTabsList = (props: Props) => {
props.tabListProps)
}
>
{ tabsList.map((tab, index) => {
{ tabsList.slice(0, props.isLoading ? 5 : Infinity).map((tab, index) => {
if (!tab.id) {
if (props.isLoading) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion ui/shared/Tabs/TabsWithScroll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const TabsWithScroll = ({
// - tabs list is changed when API data is loaded
// is to do full re-render of the tabs list
// so we use screenWidth + tabIds as a key for the TabsList component
key={ screenWidth + '_' + tabsList.map((tab) => tab.id).join(':') }
key={ isLoading + '_' + screenWidth + '_' + tabsList.map((tab) => tab.id).join(':') }
tabs={ tabs }
tabListProps={ tabListProps }
rightSlot={ rightSlot }
Expand Down

0 comments on commit e5c455b

Please sign in to comment.