[V1] QPopupEdit in QTable with Vuex data source doesn't emit save event
Software version
Quasar: 1.0.0-beta.23 @quasar/app (v1+ only): 1.0.0-beta.25 OS: Windows_NT(10.0.17763) - win32/x64 Node: 10.5.0 NPM: 6.1.0 Browsers: Chrome
What did you get as the error?
I use Vuex data as data source for QTable. I want to update the fields by QPopupEdit. If I use v-model in QPopupEdit, then I have Vuex data modification error like this issue and this forum question. If I use :value in QPopupEdit, then I can not catch save event for update Vuex data by async vuex action (by invoke REST services). Because QPopupEdit doesn't emit save event in this case. I saw this issue, but this solution is only for local data, not vuex data. This is example with :value doesn't emit save event:
<q-table ... :data="ds">
...
<template v-slot:body="props">
<q-tr :props="props">
<q-td key="desc" :props="props">
{{ props.row.email }}
<q-popup-edit :value="props.row.email" @save="(val, initialValue) => UpdateDocument(val, props.row, 'email')" buttons>
<q-input :value="props.row.email" count/>
</q-popup-edit>
</q-td>
...
</q-tr>
</template>
...
</q-table>
...
methods: {
UpdateDocument(val, row, column) {...}
This example with v-model generate Vuex data modivication error:
<template v-slot:body="props">
<q-tr :props="props">
<q-td key="desc" :props="props">
{{ props.row.email }}
<q-popup-edit v-model="props.row.email" @save="(val, initialValue) => UpdateDocument(val, props.row, 'email')" buttons>
<q-input v-model="props.row.email" count/>
</q-popup-edit>
</q-td>
...
</q-tr>
</template>
What were you expecting?
When using :value, QPopupEdit should emit events save and cancel