Browse Source

Merge pull request #6466 from nocodb/nc-fix/sidebar-navigation-issues

fix: Sidebar navigation issues
pull/6463/head
Pranav C 12 months ago committed by GitHub
parent
commit
d35bec7400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      packages/nc-gui/components/smartsheet/toolbar/SearchData.vue
  2. 12
      packages/nc-gui/store/views.ts
  3. 4
      packages/nocodb/src/modules/datas/helpers.ts

8
packages/nc-gui/components/smartsheet/toolbar/SearchData.vue

@ -63,13 +63,6 @@ const displayColumnLabel = computed(() => {
return columns.value?.find((column) => column.primaryValue)?.label
})
watch(
() => search.value.field,
() => {
onPressEnter()
},
)
watchDebounced(
() => search.value.query,
() => {
@ -113,6 +106,7 @@ watch(columns, () => {
:dropdown-match-select-width="false"
dropdown-class-name="!rounded-lg nc-dropdown-toolbar-search-field-option w-48"
class="py-1 !absolute top-0 left-0 w-full h-full z-10 text-xs opacity-0"
@change="onPressEnter"
>
<a-select-option v-for="op of columns" :key="op.value" :value="op.value">
<div class="text-[0.75rem] flex items-center -ml-1 gap-2">

12
packages/nc-gui/store/views.ts

@ -164,9 +164,15 @@ export const useViewsStore = defineStore('viewsStore', () => {
}
if (hardReload) {
await router.replace({ name: routeName, query: { reload: 'true' }, params: { viewId: tableId, projectId } }).then(() => {
router.replace({ name: routeName, query: {}, params: { viewId: tableId, projectId } })
})
await router
.replace({
name: routeName,
query: { reload: 'true' },
params: { viewId: tableId, projectId, viewTitle: view.id || '' },
})
.then(() => {
router.replace({ name: routeName, query: {}, params: { viewId: tableId, viewTitle: view.id || '', projectId } })
})
}
}

4
packages/nocodb/src/modules/datas/helpers.ts

@ -36,13 +36,15 @@ export async function getViewAndModelByAliasOrId(param: {
project_id: project.id,
aliasOrId: param.tableName,
});
if (!model) NcError.notFound('Table not found');
const view =
param.viewName &&
(await View.getByTitleOrId({
titleOrId: param.viewName,
fk_model_id: model.id,
}));
if (!model) NcError.notFound('Table not found');
if (param.viewName && !view) NcError.notFound('View not found');
return { model, view };
}

Loading…
Cancel
Save