ant-design / ant-design/pro-components

🐛[BUG]ProList开启可选择的时候,且list主键是数字的时候item无选中的样式

Open
#9,248 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🐛 bug 描述

ProList开启可选择的时候,且list主键是数字的时候item无选中的样式,当主键是字符串的时候item就正常了

### 📷 复现步骤

https://codesandbox.io/p/devbox/relaxed-joji-d8ykgw?file=%2Findex.html&workspaceId=ws_8tAGySNNDbXkzLU2L2eC95

### 🏞 期望结果

不管主键是数字还是字符串类型,item都能正常的显示 选中的样式

### 💻 复现代码

https://codesandbox.io/p/devbox/relaxed-joji-d8ykgw?file=%2Findex.html&workspaceId=ws_8tAGySNNDbXkzLU2L2eC95

### © 版本信息

"dependencies": {
"@ant-design/pro-components": "2.7.16",
"antd": "5.20.0",
"react": "18.3.1",
"react-dom": "18.3.1"
},

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction and inspect the ProList selection behavior using numeric and string primary keys. Trace the selection state into the ProList implementation, then verify that selected-item styling appears for both key types with the listed React, antd, and @ant-design/pro-components versions.

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.