1
0
Fork 0
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 
This commit is contained in:
Petr Stribny 2025-03-13 01:37:03 +00:00
commit 18372b18dd

View file

@ -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