Element: [Bug Report] el table is not reactive

Created on 31 Oct 2018  ·  4Comments  ·  Source: ElemeFE/element

Element UI version

2.4.9

OS/Browsers version

Linux/Opera

Vue version

2.5.17

Reproduction Link

https://jsfiddle.net/mmx38qxw/6771/

Steps to reproduce

Click Delete

What is Expected?

Table has no entries.

What is actually happening?

Nothing, but uncomment
this.shipment.parcels = _.clone(this.shipment.parcels);
to make it works.

Most helpful comment

how to use the this.$set?

It's attached to Vue instance, so it would be: this.$set(this.arrayInData, index, newVal). // this -> Vue

All 4 comments

Try deleting table items like this: this.$delete(this.shipment.parcels, scope.$index);

Vue recommends to use this.$set/this.$delete when you try to update items in array, so that it could pick up the changes.
Official Doc: https://vuejs.org/v2/api/#Vue-set

Try deleting table items like this: this.$delete(this.shipment.parcels, scope.$index);

Vue recommends to use this.$set/this.$delete when you try to update items in array, so that it could pick up the changes.
Official Doc: https://vuejs.org/v2/api/#Vue-set

@darekmeco it should work for you.
Thanks @BkunS

how to use the this.$set?

how to use the this.$set?

It's attached to Vue instance, so it would be: this.$set(this.arrayInData, index, newVal). // this -> Vue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fscardua picture fscardua  ·  3Comments

no5no6 picture no5no6  ·  3Comments

EdenSpark picture EdenSpark  ·  3Comments

chao-hua picture chao-hua  ·  3Comments

akaylh picture akaylh  ·  3Comments