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

[Bug Report]2.14.0 select displays value after setting up value #3705

Closed
wtusmchen opened this issue May 25, 2018 · 4 comments · Fixed by #3739
Closed

[Bug Report]2.14.0 select displays value after setting up value #3705

wtusmchen opened this issue May 25, 2018 · 4 comments · Fixed by #3739

Comments

@wtusmchen
Copy link

Environment

iview 2.14.0

Reproduction link

https://jsfiddle.net/yyrzhm46/862/

Steps to reproduce

更新到2.14后下拉框无法设置选中值,显示undefined

What is expected?

现在选中的item

What is actually happening?

显示undefined

@iview-bot
Copy link
Collaborator

Translation of this issue:
Environment
IView 2.14.0
Reproduction link
https://jsfiddle.net/yyrzhm46/862/
Steps to reproduce
Updated to 2.14 after the drop-down box can not set the selected value, showing undefined
What is expected?
The selected item now
What is actually happening?
Display undefined

@iview-bot iview-bot changed the title [Bug Report]2.14.0 select 设置value后显示undefined [Bug Report]2.14.0 select displays value after setting up value May 25, 2018
@icarusion
Copy link
Contributor

@SergioCrisostomo Before version, the logic of Option label is:

The content of the option, read slot default. If not have slot, it will show the label. If not have label, show the value. Mostly just write slot, but for cumtomized option, this is useful.

@wtusmchen you can set a slot to Option to fix now.

@aleksanderd
Copy link

some more notes...

  1. Using the label without slot:
<i-option v-for="option in options" :key="option.id" :value="option.id" :label="option.title" />

will cause an error:
TypeError: option.componentOptions.children is undefined

  1. Using option's slot for markup and attribute label for input's value(worked before) not working now - seems to be the slot's markup just copied to inputs value. label attribute is ignored if slot present? How can I provide different markup for render selected value?

@aleksanderd
Copy link

also, now remoteMethod called on option select :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants