Vue.js $set on array element does not trigger notification -


i have vue instance data contains array of objects. display data in table without issue.

upon clicking table rows, set "selected" property on corresponding data object using:

key.$set('testing', testing); 

upon setting value, add custom css class the table row, without issue.

however, if simple output of entire array of objects @ bottom of page (such below), doesn't updated reflect new "testing" attribute have added.

{{ griddata | json }} 

i able reproduce question using modified vue.js example code in jsfiddle:

https://jsfiddle.net/wdmatl/531axrtt/

notice when click on rows of data, either see "testing" or "not testing". new object data isn't reflected in json @ bottom of page. why not?


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -