Browse Source

Merge pull request #5938 from nocodb/fix/5931-useid-instead-of-alias

fix: Instead of title/alias use id with nested apis to avoid unexpected behaviour
pull/5940/head
Pranav C 1 year ago committed by GitHub
parent
commit
8b76576e19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      packages/nc-gui/composables/useLTARStore.ts

18
packages/nc-gui/composables/useLTARStore.ts

@ -158,7 +158,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
meta.value.id, meta.value.id,
rowId.value, rowId.value,
colOptions.type as 'mm' | 'hm', colOptions.type as 'mm' | 'hm',
encodeURIComponent(column?.value?.title), column?.value?.id,
{ {
limit: String(childrenExcludedListPagination.size), limit: String(childrenExcludedListPagination.size),
offset: String(childrenExcludedListPagination.size * (childrenExcludedListPagination.page - 1)), offset: String(childrenExcludedListPagination.size * (childrenExcludedListPagination.page - 1)),
@ -183,7 +183,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
sharedView.value?.uuid as string, sharedView.value?.uuid as string,
rowId.value, rowId.value,
colOptions.type as 'mm' | 'hm', colOptions.type as 'mm' | 'hm',
encodeURIComponent(column?.value?.id), column?.value?.id,
{ {
limit: String(childrenListPagination.size), limit: String(childrenListPagination.size),
offset: String(childrenListPagination.size * (childrenListPagination.page - 1)), offset: String(childrenListPagination.size * (childrenListPagination.page - 1)),
@ -198,7 +198,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
meta.value.id, meta.value.id,
rowId.value, rowId.value,
colOptions.type as 'mm' | 'hm', colOptions.type as 'mm' | 'hm',
encodeURIComponent(column?.value?.title), column?.value?.id,
{ {
limit: String(childrenListPagination.size), limit: String(childrenListPagination.size),
offset: String(childrenListPagination.size * (childrenListPagination.page - 1)), offset: String(childrenListPagination.size * (childrenListPagination.page - 1)),
@ -267,11 +267,11 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
// todo: audit // todo: audit
await $api.dbTableRow.nestedRemove( await $api.dbTableRow.nestedRemove(
NOCO, NOCO,
project.value.title as string, project.value.id as string,
metaValue.title, metaValue.id!,
rowId.value, rowId.value,
colOptions.type as 'mm' | 'hm', colOptions.type as 'mm' | 'hm',
encodeURIComponent(column?.value?.title), column?.value?.id,
getRelatedTableRowId(row) as string, getRelatedTableRowId(row) as string,
) )
@ -313,11 +313,11 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
try { try {
await $api.dbTableRow.nestedAdd( await $api.dbTableRow.nestedAdd(
NOCO, NOCO,
project.value.title as string, project.value.id as string,
metaValue.title as string, metaValue.id as string,
rowId.value, rowId.value,
colOptions.type as 'mm' | 'hm', colOptions.type as 'mm' | 'hm',
encodeURIComponent(column?.value?.title), column?.value?.id,
getRelatedTableRowId(row) as string, getRelatedTableRowId(row) as string,
) )
await loadChildrenList() await loadChildrenList()

Loading…
Cancel
Save