Tencent / Tencent/tdesign-react

[anchor锚点] 初次进入无法定位第一个tab,点击tab报错

Open
#1,975 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

example need more info
Dominant language
TypeScript
Stars
965
Forks
373
Avg merge
3d 6h
Merged PRs (30d)
17

Description

tdesign-react 版本

"tdesign-react": "0.45.2",

重现链接

No response

重现步骤

在Drawer组件的body中复用指定容器锚点case

期望结果

正确定位tab,点击tab不报错,定位到的tab颜色激活

实际结果

初次访问没有定位tab,点击tab不报错,定位到的tab颜色不对
image
image
image

框架版本

"react": "^17.0.2",

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

当前运行环境:Google浏览器,版本:109.0.5414.119

demo:

content-1 content-2 content-3 content-4 content-5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported case using the provided Drawer, Anchor, and AnchorItem demo with container="#anchor-container". Inspect the Anchor behavior when its scroll container is inside Drawer, focusing on initial positioning and active-tab updates after clicking. Done means the first tab is located on entry, clicking tabs scrolls correctly, and the active tab color matches the visible content.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.