From 4891e7afdb27044df946da3997fb9d41e0dab4ee Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 25 Nov 2021 12:48:40 +0530 Subject: [PATCH] refactor(gui): increase default column width Signed-off-by: Pranav C --- .../project/spreadsheet/helpers/columnStyling.js | 9 +++++---- .../components/project/spreadsheet/views/xcGridView.vue | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/components/project/spreadsheet/helpers/columnStyling.js b/packages/nc-gui/components/project/spreadsheet/helpers/columnStyling.js index 28bd96524a..fb7e9ded25 100644 --- a/packages/nc-gui/components/project/spreadsheet/helpers/columnStyling.js +++ b/packages/nc-gui/components/project/spreadsheet/helpers/columnStyling.js @@ -3,8 +3,8 @@ export default { ForeignKey: {}, SingleLineText: { w: '150px' }, LongText: { w: '400px' }, - Attachment: {}, - Checkbox: {}, + Attachment: { w: '400px' }, + Checkbox: { w: '100px' }, MultiSelect: { w: '200px' }, SingleSelect: { w: '200px' }, Collaborator: {}, @@ -23,11 +23,12 @@ export default { Formula: {}, Rollup: {}, Count: {}, - Lookup: {}, DateTime: {}, CreateTime: {}, LastModifiedTime: {}, AutoNumber: {}, Barcode: {}, - Button: {} + Button: {}, + LinkToAnotherRecord: { w: '400px' }, + Lookup: { w: '400px' } } diff --git a/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue b/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue index 905dc54366..57c6be4a0d 100644 --- a/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue +++ b/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue @@ -327,7 +327,7 @@ export default { style() { let style = '' for (const c of this.availableColumns) { - const val = (this.columnsWidth && this.columnsWidth[c.alias]) || (c.virtual ? '200px' : (columnStyling[c.uidt] && columnStyling[c.uidt].w)) + const val = (this.columnsWidth && this.columnsWidth[c.alias]) || (c.virtual ? '200px' : ((columnStyling[c.uidt] && columnStyling[c.uidt].w) || '150px')) if (val && c.key !== this.resizingCol) { style += `[data-col="${c.alias}"]{min-width:${val};max-width:${val};width: ${val};}` }