ant-design / ant-design/pro-components

🐛[BUG]protable 的lightfilter模式下select组件清除会提示:Cannot read properties of null (reading 'label')

Open
#9,227 6 comments 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

```
{
title: intl.formatMessage({ id: 'field.type' }),
dataIndex: 'type',
key: 'type',
width: 40,
ellipsis: true,
valueEnum: { to: {
text: intl.formatMessage({ id: 'field.address.type.to' }),
color: 'success',
},
cc: {
text: intl.formatMessage({ id: 'field.address.type.cc' }),
color: 'blue',
},
bcc: {
text: intl.formatMessage({ id: 'field.address.type.bcc' }),
color: 'purple',
},},
},
```
点击清除按钮会报错,跟国际化无关,试过把所有column删了,只留下一句{xx:{text:xx,color:'green'}}一样报错

Cannot read properties of null (reading 'label')

Contributor guide

Open the contributing guide

Research direction

Reproduce the error in ProTable's lightfilter mode using the shown valueEnum and the Select clear button. Trace the Select clearing path around the valueEnum configuration; done means clearing no longer raises the null-label error while the filter is cleared successfully.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.