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: {},
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' }
}

2
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};}`
}

Loading…
Cancel
Save