Skip to content

Commit

Permalink
Merge pull request #245 from frappe/develop
Browse files Browse the repository at this point in the history
chore: merge `develop` into `main`
  • Loading branch information
nextchamp-saqib authored Apr 29, 2024
2 parents aa3c613 + 4bbf3ad commit d796a81
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/query/ChartSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function downloadChartImage() {
:is="chart.component"
:options="chart.options"
:data="chart.data"
:key="JSON.stringify(query.chart.doc)"
:key="JSON.stringify(query.chart.doc) + JSON.stringify(query.chart.data)"
/>
</div>
</template>
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/query/visual/ColumnSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const query = inject('query')
const assistedQuery = inject('assistedQuery')
!assistedQuery.columnOptions.length && assistedQuery.fetchColumnOptions()
const columns = computed(() => assistedQuery.columns)
const columns = computed({
get: () => assistedQuery.columns,
set: (value) => (assistedQuery.columns = value),
})
const columnRefs = ref(null)
const activeColumnIdx = ref(null)
const showExpressionEditor = computed(() => {
Expand Down Expand Up @@ -100,10 +103,9 @@ function onColumnSort(e) {
</SectionHeader>
<DraggableList
v-if="columns.length"
:items="columns"
v-model:items="columns"
group="columns"
item-key="label"
@sort="onColumnSort"
:showEmptyState="true"
:showHandle="false"
>
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/widgets/PivotTable/PivotTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ChartTitle from '@/components/Charts/ChartTitle.vue'
import TanstackTable from '@/components/Table/TanstackTable.vue'
import { watchDebounced } from '@vueuse/core'
import { call } from 'frappe-ui'
import { computed, ref } from 'vue'
import { computed, ref, watch } from 'vue'
import { convertToNestedObject, convertToTanstackColumns } from './utils'
const props = defineProps({
Expand All @@ -12,6 +12,8 @@ const props = defineProps({
})
const _data = computed(() => props.data)
watch(_data, reloadPivotData, { deep: true })
const indexColumns = computed(() => props.options.rows?.map((column) => column.value) || [])
const pivotColumns = computed(() => props.options.columns?.map((column) => column.value) || [])
const valueColumns = computed(() => props.options.values?.map((column) => column.value) || [])
Expand Down

0 comments on commit d796a81

Please sign in to comment.