In the Vuex tutorial, it appears that getSourceData() is used to commit a complete set of data to the store, so I presume this is the right way to record updates with Vue?
A few questions:
is this change of behaviour documented? If not, why not?
is using getSourceData() the right way to make 2-way updates? Again, why not documented?
if the data is not stored by-reference, how should we handle 2-way updates? I presume, use a watch?
if using a local datasource, not vuex, if we update that, will it affect the table?
My comment here would be that data reactivity is one of the key selling points of Vue, and it would be really useful to address right at the start of the tutorials, even before passing attributes, etc.
re-setting the original data from the callback only appears to show some of it (see how table[2][1] is null)
when typing, the typed-in row will only update when the NEXT row gets data (try setting the cols to 3, then when one row is filling up it doesn’t update until you type in the next row)
My next challenge was going to be to sanitise and submit the data, which may have involved updating the table again… which I’m not sure will work now because of this weird delay.
I agree about Vue. But the default reactivity in Vue is done one way. Two way is done by v-model which is a sugar syntax to simplify work with inputs. Handsonstable might be too complicated component for this.
It’s not a change in behavior. Data object reference is mentioned in the docs more as a “warning” or to make you aware of the reference. Handsontable stores a lot of meta data next to data and we can’t update them if don’t use our API to make changes.
Yes. If you call render() afterwards or have observeChanges plugin active (not recommended and will be deprecated soon). Otherwise the data will update in next render cycle which you’ve observed in your second comment:
That’s why we have an API so you don’t have to worry about render and/or meta data updates.
I’m going to concentrate on a couple of other bits of the time being, but I will come back to this in a few days or possibly weeks when we look to polish things again