Browse Source

fix(gui-v2): add missing fields, sortArrJson & filterArrJson

pull/3383/head
Wing-Kam Wong 2 years ago
parent
commit
15d7dcf4af
  1. 6
      packages/nc-gui-v2/components/smartsheet-toolbar/ExportSubActions.vue
  2. 5
      packages/nc-gui-v2/components/smartsheet-toolbar/MoreActions.vue

6
packages/nc-gui-v2/components/smartsheet-toolbar/ExportSubActions.vue

@ -5,6 +5,7 @@ import * as XLSX from 'xlsx'
import { message } from 'ant-design-vue'
const isPublicView = inject(IsPublicInj, ref(false))
const fields = inject(FieldsInj, ref([]))
const { project } = useProject()
@ -15,6 +16,8 @@ const meta = inject(MetaInj)
const selectedView = inject(ActiveViewInj)
const { sorts, nestedFilters } = useSmartsheetStoreOrThrow()
const exportFile = async (exportType: ExportTypes) => {
let offset = 0
let c = 1
@ -36,7 +39,10 @@ const exportFile = async (exportType: ExportTypes) => {
{
responseType,
query: {
fields: fields.value.map((field) => field.title),
offset,
sortArrJson: JSON.stringify(sorts.value),
filterArrJson: JSON.stringify(nestedFilters.value),
},
} as any,
)

5
packages/nc-gui-v2/components/smartsheet-toolbar/MoreActions.vue

@ -33,6 +33,8 @@ const fields = inject(FieldsInj, ref([]))
const selectedView = inject(ActiveViewInj)
const { sorts, nestedFilters } = useSmartsheetStoreOrThrow()
const isLocked = inject(IsLockedInj)
const showWebhookDrawer = ref(false)
@ -62,7 +64,10 @@ const exportFile = async (exportType: ExportTypes) => {
{
responseType,
query: {
fields: fields.value.map((field) => field.title),
offset,
sortArrJson: JSON.stringify(sorts.value),
filterArrJson: JSON.stringify(nestedFilters.value),
},
} as any,
)

Loading…
Cancel
Save