Browse Source

fix(nc-gui): revise filterArrJson and sortArrJson in fetchSharedViewGroupedData

pull/4848/head
Wing-Kam Wong 2 years ago
parent
commit
5e5be6adc7
  1. 10
      packages/nc-gui/composables/useSharedView.ts

10
packages/nc-gui/composables/useSharedView.ts

@ -126,7 +126,10 @@ export function useSharedView() {
return data
}
const fetchSharedViewGroupedData = async (columnId: string, params: Parameters<Api<any>['dbViewRow']['list']>[4] = {}) => {
const fetchSharedViewGroupedData = async (
columnId: string,
{ sortsArr, filtersArr }: { sortsArr: SortType[]; filtersArr: FilterType[] },
) => {
if (!sharedView.value) return
const page = paginationData.value.page || 1
@ -137,9 +140,8 @@ export function useSharedView() {
columnId,
{
offset: (page - 1) * pageSize,
filterArrJson: JSON.stringify(nestedFilters.value),
sortArrJson: JSON.stringify(sorts.value),
...params,
filterArrJson: JSON.stringify(filtersArr ?? nestedFilters.value),
sortArrJson: JSON.stringify(sortsArr ?? sorts.value),
} as any,
{
headers: {

Loading…
Cancel
Save