|
|
|
@ -421,12 +421,10 @@ const [useProvideViewGroupBy, useViewGroupBy] = useInjectionState(
|
|
|
|
|
if (groupBy.value.length > 0) { |
|
|
|
|
rootGroup.value.paginationData = { page: 1, pageSize: groupByGroupLimit.value } |
|
|
|
|
rootGroup.value.column = {} as any |
|
|
|
|
await loadGroups() |
|
|
|
|
refreshNested() |
|
|
|
|
nextTick(() => reloadViewDataHook?.trigger()) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ immediate: true }, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
const findGroupByNestedIn = (nestedIn: GroupNestedIn[], group?: Group, nestLevel = 0): Group => { |
|
|
|
@ -543,12 +541,11 @@ const [useProvideViewGroupBy, useViewGroupBy] = useInjectionState(
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
|
|
await loadAllowedLookups() |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
watch(meta, async () => { |
|
|
|
|
watch([() => view?.value?.id, () => meta.value?.columns], async ([newViewId]) => { |
|
|
|
|
// reload only if view belongs to current table
|
|
|
|
|
if (newViewId && view.value?.fk_model_id === meta.value?.id) { |
|
|
|
|
await loadAllowedLookups() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|