Skip to content

Commit

Permalink
export apiPrefs, results, skip, take, total
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Sep 3, 2024
1 parent db61b83 commit d6f0878
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/AutoQueryGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ const primaryKey = computed(() => getPrimaryKey(typeOf(typeName.value || apis.va
const take = computed(() => apiPrefs.value.take ?? defaultTake)
const results = computed<any[]>(() => api.value.response ? mapGet(api.value.response, 'results') : null ?? [])
const total = computed<number>(() => api.value.response?.total ?? results.value.length ?? 0)
const total = computed<number>(() => (api.value.response?.total || results.value.length) ?? 0)
const canFirst = computed(() => skip.value > 0)
const canPrev = computed(() => skip.value > 0)
Expand All @@ -354,7 +354,7 @@ const Errors = {
defineExpose({
update, search, createRequestArgs, reset, createDone, createSave, editDone, editSave, forceUpdate, setEdit,
edit, createForm, editForm,
edit, createForm, editForm, apiPrefs, results, skip, take, total,
})
if (Sole.interceptors.has('AutoQueryGrid.new')) Sole.interceptors.invoke('AutoQueryGrid.new', { props })
Expand Down

0 comments on commit d6f0878

Please sign in to comment.