Browse Source

refactor(gui): increase default column width

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/764/head
Pranav C 3 years ago
parent
commit
4891e7afdb
  1. 9
      packages/nc-gui/components/project/spreadsheet/helpers/columnStyling.js
  2. 2
      packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue

9
packages/nc-gui/components/project/spreadsheet/helpers/columnStyling.js

@ -3,8 +3,8 @@ export default {
ForeignKey: {}, ForeignKey: {},
SingleLineText: { w: '150px' }, SingleLineText: { w: '150px' },
LongText: { w: '400px' }, LongText: { w: '400px' },
Attachment: {}, Attachment: { w: '400px' },
Checkbox: {}, Checkbox: { w: '100px' },
MultiSelect: { w: '200px' }, MultiSelect: { w: '200px' },
SingleSelect: { w: '200px' }, SingleSelect: { w: '200px' },
Collaborator: {}, Collaborator: {},
@ -23,11 +23,12 @@ export default {
Formula: {}, Formula: {},
Rollup: {}, Rollup: {},
Count: {}, Count: {},
Lookup: {},
DateTime: {}, DateTime: {},
CreateTime: {}, CreateTime: {},
LastModifiedTime: {}, LastModifiedTime: {},
AutoNumber: {}, AutoNumber: {},
Barcode: {}, Barcode: {},
Button: {} Button: {},
LinkToAnotherRecord: { w: '400px' },
Lookup: { w: '400px' }
} }

2
packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue

@ -327,7 +327,7 @@ export default {
style() { style() {
let style = '' let style = ''
for (const c of this.availableColumns) { 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) { if (val && c.key !== this.resizingCol) {
style += `[data-col="${c.alias}"]{min-width:${val};max-width:${val};width: ${val};}` style += `[data-col="${c.alias}"]{min-width:${val};max-width:${val};width: ${val};}`
} }

Loading…
Cancel
Save