Element: el-select multiple with vuex

Created on 5 Jan 2017  ·  6Comments  ·  Source: ElemeFE/element

ElementUI version

1.1.2

OS/Browers version

Chrome 54

Vue version

2.1.0

Steps to reproduce

I am unable to get VueX to work with a multiple el-select component. I've found numerous tickets that referenced #1632 and tried implementing it in my own code. This workaround works fine when multiple is not used. But when using multiple it does not work.

Most helpful comment

@Leopoldthecoder 示例中没有执行update函数,并没有触发input事件,而是通过数组直接push进了value中,严格模式下,报错

All 6 comments

Seems working: https://jsfiddle.net/hq4scjto/15/
Please note that the initial value should be an array.

@Leopoldthecoder 示例中没有执行update函数,并没有触发input事件,而是通过数组直接push进了value中,严格模式下,报错

@Leopoldthecoder this is still an issue as @wilsonIs explains.
The input event will never be emitted when the multiple property is true:
https://github.com/ElemeFE/element/blob/dev/packages/select/src/select.vue#L507

This breaks compability with vuex. Please reopen this issue.

I'll try to fix this.

Please review my PR @Leopoldthecoder

Fixed in #4226

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gengxuelei picture gengxuelei  ·  3Comments

zhguokai picture zhguokai  ·  3Comments

makunsusu picture makunsusu  ·  3Comments

yuchonghua picture yuchonghua  ·  3Comments

yorululu picture yorululu  ·  3Comments