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

[Feature Request] Cascader lazy true sets default values #16136

Closed
djkdeveloper opened this issue Jun 19, 2019 · 15 comments
Closed

[Feature Request] Cascader lazy true sets default values #16136

djkdeveloper opened this issue Jun 19, 2019 · 15 comments
Assignees

Comments

@djkdeveloper
Copy link

Existing Component

Component Name

Cascader

Description

Cascader组件当lazy设置为true延时加载的时候能否让我设置默认值,场景如果,新增用户信息的时候选择了省市区,然后修改用户的时候,默认选中用户的省市区(是延时加载的时候)

@element-bot element-bot changed the title [Feature Request] Cascader lazy true 设置默认值 [Feature Request] Cascader lazy true sets default values Jun 19, 2019
@element-bot
Copy link
Member

Translation of this issue:

Existing Component

yes

Component Name

Cascader

Description

Can Cascader let me set default when lazy is set to true delay loading? Scenario if, when adding user information, the province or city is selected, and then when modifying the user, the province or city of the user is selected by default (when delayed loading).

@tangchi695
Copy link

同问怎么在lazy模式下设置默认值。想手动触发加载数据,但是看了源码,发现太复杂了。。。

@jiangxuzh
Copy link

同问~

@wuciyou
Copy link

wuciyou commented Jun 28, 2019

同问

@CoderLim
Copy link

+1,貌似还不能设置呢

@spacecn
Copy link

spacecn commented Jul 1, 2019

+1

2 similar comments
@Veyhunk
Copy link

Veyhunk commented Jul 2, 2019

+1

@Veyhunk
Copy link

Veyhunk commented Jul 2, 2019

+1

@1393983569
Copy link

我也遇到了同样的问题,设置为lazy的时候如何设置默认值,有谁解决这个问题了吗

@AndsteLyc
Copy link

I have same question.

@okool
Copy link

okool commented Jul 14, 2019

+1,不能设置默认值,lazy这个就是鸡肋.发现element所有远程加载的控件都不支持设置默认值.
然后真正业务场景使用时大部分都需要回显功能.其它组件都可以二次封装,支持回显.
唯独cascader无法扩展,因为填充数据使用callback方式.
如果提供类似setChildren(node,children),也能轻松扩展.
另,el UI组件之间依赖过重,大量使用dispatch和broadcast. 使其不兼容其它UI组件.

@kimliy
Copy link

kimliy commented Jul 15, 2019

+1 遇到这个问题了

@luckyCao
Copy link
Contributor

luckyCao commented Jul 24, 2019

pr 已经合并 #16420

@lb1129
Copy link

lb1129 commented May 11, 2020

this.$refs.cascader.panel.initStore() ?

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

No branches or pull requests

15 participants