Skip to content

Commit 5692cc0

Browse files
authored
Fix "View not found" error when navigating to a row via workspace search (baserow#4753)
1 parent 5902f37 commit 5692cc0

6 files changed

Lines changed: 10 additions & 2 deletions

File tree

premium/web-frontend/modules/baserow_premium/notificationTypes.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export class RowCommentMentionNotificationType extends NotificationType {
2222
params: {
2323
databaseId: notificationData.database_id,
2424
tableId: notificationData.table_id,
25+
viewId: '',
2526
rowId: notificationData.row_id,
2627
},
2728
}
@@ -47,6 +48,7 @@ export class RowCommentNotificationType extends NotificationType {
4748
params: {
4849
databaseId: notificationData.database_id,
4950
tableId: notificationData.table_id,
51+
viewId: '',
5052
rowId: notificationData.row_id,
5153
},
5254
}

web-frontend/modules/database/components/notifications/UserMentionInRichTextFieldNotification.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export default {
4848
return {
4949
databaseId: this.notification.data.database_id,
5050
tableId: this.notification.data.table_id,
51+
viewId: '',
5152
rowId: this.notification.data.row_id,
5253
}
5354
},

web-frontend/modules/database/notificationTypes.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export class CollaboratorAddedToRowNotificationType extends NotificationType {
2525
params: {
2626
databaseId: notificationData.database_id,
2727
tableId: notificationData.table_id,
28+
viewId: '',
2829
rowId: notificationData.row_id,
2930
},
3031
}
@@ -50,6 +51,7 @@ export class FormSubmittedNotificationType extends NotificationType {
5051
params: {
5152
databaseId: notificationData.database_id,
5253
tableId: notificationData.table_id,
54+
viewId: '',
5355
rowId: notificationData.row_id,
5456
},
5557
}
@@ -75,6 +77,7 @@ export class UserMentionInRichTextFieldNotificationType extends NotificationType
7577
params: {
7678
databaseId: notificationData.database_id,
7779
tableId: notificationData.table_id,
80+
viewId: '',
7881
rowId: notificationData.row_id,
7982
},
8083
}

web-frontend/modules/database/pages/table.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ const database = computed(() => $store.getters['application/getSelected'])
8484
const table = computed(() => $store.getters['table/getSelected'])
8585
8686
const { data, error, pending, status, refresh } = await useAsyncData(
87-
`database-table-page-${route.params.viewId ?? 'null'}`,
87+
`database-table-page-${route.params.databaseId}-${route.params.tableId}-${route.params.viewId ?? 'null'}`,
8888
async () => {
8989
// Use current route params (not captured params) so refresh works correctly
90-
const currentParams = route.params
90+
const currentParams = { ...route.params }
9191
const viewId = currentParams.viewId ? parseInt(currentParams.viewId) : null
9292
9393
const result = {

web-frontend/modules/database/searchTypes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export class DatabaseRowSearchType extends BaseSearchType {
129129
params: {
130130
databaseId: result.metadata.database_id,
131131
tableId: result.metadata.table_id,
132+
viewId: '',
132133
rowId: result.metadata.row_id,
133134
},
134135
}

web-frontend/modules/database/store/view.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ export const actions = {
340340
const { $client, $registry } = this
341341
commit('SET_LOADING', true)
342342
commit('UNSELECT', {})
343+
commit('SET_DEFAULT_VIEW_ID', null)
343344

344345
try {
345346
const { data } = await ViewService($client).fetchAll(

0 commit comments

Comments
 (0)