Skip to content

Commit

Permalink
fix(tabs): 修复activeId为一个不存在的值或空值,下划线显示不对的问题(#2939) (#2940)
Browse files Browse the repository at this point in the history
* fix(tabs): 修复activeId为一个不存在的值或空值,下划线显示不对的问题(#2939)

* chore(tabs): 生成变更记录文件

---------

Co-authored-by: xiamiao <[email protected]>
  • Loading branch information
xiamiao1121 and xiamiao authored Jul 23, 2024
1 parent a9007bd commit 516e30c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eight-poets-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/hiui": patch
---

fix(tabs): 修复 activeId 为一个不存在的值或空值,下划线显示不对的问题
5 changes: 5 additions & 0 deletions .changeset/sweet-garlics-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/tabs": patch
---

fix: 修复 activeId 为一个不存在的值或空值,下划线显示不对的问题
2 changes: 1 addition & 1 deletion packages/ui/tabs/src/TabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export const TabList = forwardRef<HTMLDivElement | null, TabListProps>(
direction={direction}
/>
))}
{type === 'line' ? (
{type === 'line' && data.some((item) => item.tabId === activeTabId) ? (
<TabInk
prefixCls={prefixCls}
showHorizontal={showHorizontal}
Expand Down

0 comments on commit 516e30c

Please sign in to comment.