Skip to content

fix: 修复刷新之后 label 丢失的情况#8982

Merged
chenshuai2144 merged 1 commit intoant-design:masterfrom
LovePlayCode:fix_label
Feb 17, 2025
Merged

fix: 修复刷新之后 label 丢失的情况#8982
chenshuai2144 merged 1 commit intoant-design:masterfrom
LovePlayCode:fix_label

Conversation

@LovePlayCode
Copy link
Contributor

如果用户使用了 request和labelInValue,保存之后,刷新页面,正常回显,但是再次添加会出现 label 丢失的情况。所以需要兼容

@github-actions
Copy link

⚡️ Deploying PR Preview...

Comment on lines -299 to +302
label: preserveOriginalLabel ? dataItem?.label : value.label,
// 这里有一种情况,如果用户使用了 request和labelInValue,保存之后,刷新页面,正常回显,但是再次添加会出现 label 丢失的情况。所以需要兼容
label: preserveOriginalLabel
? dataItem?.label || value.label
: value.label,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释部分应该贴一个 issue 地址,或者复现地址,不熟悉的人 review 可能想象不到这个 case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

@chenshuai2144 chenshuai2144 merged commit 93b2c28 into ant-design:master Feb 17, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants