ant-design / ant-design/pro-components
🐛[BUG]protable 的lightfilter模式下select组件清除会提示:Cannot read properties of null (reading 'label')
- 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
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