mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-11 07:51:20 +00:00
Merge branch 'chart-instant-series-delete' into 'develop'
Add optimistic update when deleting chart series See merge request baserow/baserow!3241
This commit is contained in:
commit
18372b18dd
1 changed files with 6 additions and 3 deletions
|
@ -83,6 +83,7 @@
|
|||
<div class="margin-bottom-2"></div>
|
||||
<AggregationSeriesForm
|
||||
v-for="(series, index) in values.aggregation_series"
|
||||
ref="aggregationSeriesForms"
|
||||
:key="index"
|
||||
:table-fields="tableFields"
|
||||
:aggregation-series="values.aggregation_series"
|
||||
|
@ -348,13 +349,15 @@ export default {
|
|||
},
|
||||
async deleteSeries(index) {
|
||||
this.setEmitValues(false)
|
||||
const updatedAggregationSeries = this.values.aggregation_series
|
||||
updatedAggregationSeries.splice(index, 1)
|
||||
this.values.aggregation_series.splice(index, 1)
|
||||
await this.$nextTick()
|
||||
this.$refs.aggregationSeriesForms.forEach((form) => form.reset())
|
||||
this.$emit('values-changed', {
|
||||
aggregation_series: updatedAggregationSeries,
|
||||
aggregation_series: this.values.aggregation_series,
|
||||
})
|
||||
await this.$nextTick()
|
||||
this.setEmitValues(true)
|
||||
this.v$.$touch()
|
||||
},
|
||||
onAggregationSeriesUpdated(index, aggregationSeriesValues) {
|
||||
const updatedAggregationSeries = this.values.aggregation_series
|
||||
|
|
Loading…
Add table
Reference in a new issue