From d12e1e73a19f677424d80d456223635024f26614 Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Wed, 26 Jun 2024 12:51:42 -0400 Subject: [PATCH] fix: Smart picker properly displays widget Signed-off-by: Elizabeth Danzberger --- src/shared/components/ncTable/sections/CustomTable.vue | 2 ++ src/views/SmartPicker.vue | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/shared/components/ncTable/sections/CustomTable.vue b/src/shared/components/ncTable/sections/CustomTable.vue index 4a0307d91..e14a59456 100644 --- a/src/shared/components/ncTable/sections/CustomTable.vue +++ b/src/shared/components/ncTable/sections/CustomTable.vue @@ -83,6 +83,7 @@ import { TYPE_META_ID, TYPE_META_CREATED_BY, TYPE_META_CREATED_AT, TYPE_META_UPDATED_BY, TYPE_META_UPDATED_AT, } from '../../../../shared/constants.js' import { MetaColumns } from '../mixins/metaColumns.js' +import { translate as t } from '@nextcloud/l10n' export default { name: 'CustomTable', @@ -316,6 +317,7 @@ export default { }, methods: { + t, addMagicFieldsValues(filter) { Object.values(MagicFields).forEach(field => { const newFilterValue = filter.value.replace('@' + field.id, field.replace) diff --git a/src/views/SmartPicker.vue b/src/views/SmartPicker.vue index 90e8aafef..aa2093167 100644 --- a/src/views/SmartPicker.vue +++ b/src/views/SmartPicker.vue @@ -144,8 +144,12 @@ export default { const { default: store } = await import( /* webpackChunkName: 'store' */ '../store/store.js') + const { default: data } = await import( + /* webpackChunkName: 'store' */ + '../store/data.js') this.$store = store + this.$store.data = data } }, @@ -176,6 +180,7 @@ export default { this.richObject.rowsCount = this.value.rowsCount this.richObject.title = this.value.label this.richObject.type = this.value.type + this.richObject.id = this.value.value }, async loadColumnsForContentPreview() { if (this.value === null) {