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

autocomplete Nzlabel should not affect the submit of form data #1298

Closed
smile2014 opened this issue Apr 10, 2018 · 11 comments
Closed

autocomplete Nzlabel should not affect the submit of form data #1298

smile2014 opened this issue Apr 10, 2018 · 11 comments

Comments

@smile2014
Copy link

Version

0.7.0-beta.3

Environment

0.7.0-beta.3

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-setup-ztvtap

Steps to reproduce

选中12345,保存表单,应该提交的数据是12345,而不是A

What is expected?

选择的什么保存就是什么,显示不应该影响实际的值

What is actually happening?

12345

Other?

@smile2014
Copy link
Author

@JCqiu
Copy link

JCqiu commented Apr 11, 2018

你应该写nzValue="12345",而不是[nvValue]=“‘12345’”

@smile2014
Copy link
Author

@JCqiu 说白了,我想autocomplete,显示的值和提交的值可以分开。目前好像不支持,类似material2
https://stackblitz.com/edit/angular-a6bntv?file=app%2Fautocomplete-display-example.html

@JCqiu
Copy link

JCqiu commented Apr 11, 2018

@smile2014 其实是可以的,我都用了的,是你写法不对而已,0.7.0版很多写法都改变了,多参考文档就可以了

@vthinkxie
Copy link
Member

https://stackblitz.com/edit/ng-zorro-antd-setup-sbuyix?file=app/app.component.html please make sure you have used ng-zorro-antd in correct way.

@smile2014
Copy link
Author

@JCqiu 你能好好看看我贴的material2效果吗。

@smile2014
Copy link
Author

@vthinkxie 你能看看我贴的 material2的效果吗,谢谢了
https://stackblitz.com/edit/angular-a6bntv?file=app%2Fautocomplete-display-example.html

@JCqiu
Copy link

JCqiu commented Apr 11, 2018

@smile2014 你能好好看文档在使用行嘛,不然作者为什么会关掉你的问题

@smile2014
Copy link
Author

@JCqiu 例如我input里显示name,value 值是{code:'aaa',name:'bb'},作者压根就没细看,提供了一个链接根本就不是我想要的效果

@vthinkxie
Copy link
Member

@smile2014 got it now.

@lock
Copy link

lock bot commented May 24, 2019

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 24, 2019
hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants