-
-
Notifications
You must be signed in to change notification settings - Fork 49.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: allow selecting only value on double click on DescriptionsItem #24983
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 90e827a:
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 434bc71:
|
Codecov Report
@@ Coverage Diff @@
## master #24983 +/- ##
=======================================
Coverage 99.37% 99.37%
=======================================
Files 365 365
Lines 7303 7303
Branches 2041 2032 -9
=======================================
Hits 7257 7257
Misses 46 46 Continue to review full report at Codecov.
|
The CI broken. Maybe you should run |
components/descriptions/Cell.tsx
Outdated
{content && <span className={classNames(`${itemPrefixCls}-item-content`)}>{content}</span>} | ||
{content && ( | ||
<span className={classNames(`${itemPrefixCls}-item-content`)}> | ||
<div>{content}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think put a div into span is a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should consider other element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rustin-Liu Thanks for the comment.
I agree. I found a related issue:
The accepted answer suggests inserting an invisible space between span
tags:
<span>Lemon2</span><i style="font-size:0;"> </i><span>Pear2</span>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rustin-Liu What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's OK for me. Thanks!
Could we try this? .ant-descriptions-item>span {
- display: inline-block;
+ display: inline-flex;
+ align-items: baseline;
} |
@afc163 Got it. |
@afc163 Verified it works. https://preview-24983-ant-design.surge.sh/components/descriptions/#header |
@Rustin-Liu @afc163 Thanks for the support! |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
Fix #24977
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge