Skip to content
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

Can u add a property named title="" for select component? #1974

Closed
Picktarget opened this issue Aug 13, 2018 · 14 comments
Closed

Can u add a property named title="" for select component? #1974

Picktarget opened this issue Aug 13, 2018 · 14 comments
Labels
💪 Enhancement Good First Issue Issues recommended for first-time contributor

Comments

@Picktarget
Copy link

What problem does this feature solve?

when the width is short,it can't support to display the whole content that I have chosen.

What does the proposed API look like?

[nzTitle]="title",title's value is what I have chosen

@wzhudev
Copy link
Member

wzhudev commented Aug 13, 2018

@Picktarget Chinese is ok here. Please describe your proposal in detail.

@Picktarget
Copy link
Author

需要一个select组件的title属性的功能,因为有时候不能通过增加select的宽度,以此来显示完整的选择后的内容,不知道我这样描述,您是否能懂?

@wzhudev
Copy link
Member

wzhudev commented Aug 13, 2018

@Picktarget 你可以试试这样做,用 nz-tooltip 指令修饰这个元素: https://stackblitz.com/edit/angular-mdzgee?file=src/app/app.component.ts

这是你想要的效果吗?

@wzhudev
Copy link
Member

wzhudev commented Aug 13, 2018

It's a feature that Ant Design has. We should make an enhancement here.

@wzhudev
Copy link
Member

wzhudev commented Aug 13, 2018

Hint for fixing this issue:

2018-08-13 1 12 04

According to Ant Design, one just simply bind a title attribute to the div.

@wzhudev wzhudev added the Good First Issue Issues recommended for first-time contributor label Aug 13, 2018
@Picktarget
Copy link
Author

可以做到 类似 test这种默认效果吗?

@Picktarget
Copy link
Author

nz-tooltip [nzTitle]="value" 这样使用在value为空字符串时也是有tooltip的效果。。。。。

@wzhudev
Copy link
Member

wzhudev commented Aug 13, 2018

@Picktarget 你有兴趣提交一个 PR 吗,Ant Design 已经有你想要的这种效果,对照他们的方案实现一下。

@Picktarget
Copy link
Author

okay,my pleasure

@wzhudev
Copy link
Member

wzhudev commented Aug 13, 2018

@Picktarget Thx! Then I am gonna assign this issue to you.

@Picktarget
Copy link
Author

okay

@IssueHuntBot
Copy link

@0maxxam0 funded this issue with $15. See it on IssueHunt

@IssueHuntBot
Copy link

@tirelyl has submitted a pull request. See it on IssueHunt

@IssueHuntBot
Copy link

@vthinkxie has rewarded $13.50 to @tirelyl. (Total deposit: $15.00, Repository reward(0%): $0.00, Service fee(10%): $1.50) See it on IssueHunt

hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 Enhancement Good First Issue Issues recommended for first-time contributor
Projects
None yet
Development

No branches or pull requests

3 participants