Element: [Bug Report] Menu binding to defaultActive don't update at beginning

Created on 6 Apr 2017  ·  6Comments  ·  Source: ElemeFE/element

Element UI version

1.2.7

OS/Browsers version

macOS Sierra 10.12.4 / Chrome 57

Vue version

2.2.6

Reproduction Link

http://jsfiddle.net/saetsgzo/

Steps to reproduce

Update menu items (with v-for, for example) and change default-active right after adding/removing items

What is Expected?

Active menu to be changed

What is actually happening?

Active menu is not changed. Just as an example, this fiddle works: http://jsfiddle.net/z3wLb2wx/. Setting a timeout to change the default active changes the active item, but if you change right after adding, it does not update.

Most helpful comment

All 6 comments

I'm not sure if binding to default-active is the best approach, perhaps adding a v-model so we can directly track which item is active.

This is probably a duplicate of #2670. Feel free to close if you think so

your demo is not about menu

@baiyaaaaa sorry about that, used an old JSFiddle and forgot to save. Updated the comment with the new link: http://jsfiddle.net/saetsgzo/

need prop "action", data name "actionIndex", but not implement

Was this page helpful?
0 / 5 - 0 ratings

Related issues

no5no6 picture no5no6  ·  3Comments

makunsusu picture makunsusu  ·  3Comments

gengxuelei picture gengxuelei  ·  3Comments

yorululu picture yorululu  ·  3Comments

yubo111 picture yubo111  ·  3Comments