Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Fix: Width Column View (#2707)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricargame authored Sep 30, 2024
1 parent 73f1bf1 commit e301d2f
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/components/ADempiere/DataTable/Windows/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
element-loading-background="rgba(255, 255, 255, 0.8)"
:element-loading-text="$t('notifications.loading')"
:row-class-name="tableRowClassName"
style="overflow: auto;"
style="overflow: auto"
@row-dblclick="handleRowDblClick"
@select-all="handleSelectionAll"
@cell-click="handleCellClick"
Expand Down Expand Up @@ -617,9 +617,13 @@ export default defineComponent({
}

function widthColumn(fieldAttributes) {
const { componentPath } = fieldAttributes
if (['FieldSearch', 'FieldAccountingCombination'].includes(componentPath)) return '500'
return '250'
const { name } = fieldAttributes
const size = 12
let lenght = name.length
if (lenght <= 9) {
lenght = 10
}
return lenght * size
}

/**
Expand Down Expand Up @@ -747,9 +751,6 @@ export default defineComponent({
text-overflow: ellipsis;
white-space: normal;
word-break: break-all;
line-height: 15px;
padding-left: 10px;
padding-right: 10px;
padding-top: 5px;
padding-bottom: 5px;
}
Expand All @@ -760,5 +761,8 @@ export default defineComponent({
.el-table thead tr {
height: 40px!important
}
.el-table th.el-table__cell > .cell{
padding: 5px !important;
}
}
</style>

0 comments on commit e301d2f

Please sign in to comment.