summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/DataTable.vue
diff options
context:
space:
mode:
authorUdo Walter2019-02-24 05:14:10 +0100
committerUdo Walter2019-02-24 05:14:10 +0100
commit9a7eaabf973859920b68dfe52e916fc53d847966 (patch)
tree561ee8f2a692f4a7bfda360c174266bf1716be12 /webapp/src/components/DataTable.vue
parent[webapp/dashboard] Add username to the topbar & put fullname in the global store (diff)
downloadbas-9a7eaabf973859920b68dfe52e916fc53d847966.tar.gz
bas-9a7eaabf973859920b68dfe52e916fc53d847966.tar.xz
bas-9a7eaabf973859920b68dfe52e916fc53d847966.zip
[webapp/datatable] use minWidth prop for menuMode
Diffstat (limited to 'webapp/src/components/DataTable.vue')
-rw-r--r--webapp/src/components/DataTable.vue13
1 files changed, 7 insertions, 6 deletions
diff --git a/webapp/src/components/DataTable.vue b/webapp/src/components/DataTable.vue
index aba0d3d..7925044 100644
--- a/webapp/src/components/DataTable.vue
+++ b/webapp/src/components/DataTable.vue
@@ -124,7 +124,7 @@
@click.native.capture.passive="setShiftState"
>
<template slot="before-container">
- <div class="table-head-wrapper non-selectable" :style="{ 'min-width': minTableWidth }">
+ <div class="table-head-wrapper non-selectable" :style="{ 'min-width': minWidth }">
<div class="table-head">
<div class="non-selectable header-cell">
<v-icon @click="toggleSelectAll">
@@ -199,6 +199,10 @@ export default {
menuMode: {
type: Boolean,
default: false
+ },
+ menuModeRowCount: {
+ type: Number,
+ default: 6
}
},
data () {
@@ -221,14 +225,11 @@ export default {
searchableHeaders () {
return this.headers.filter(h => h.text !== undefined)
},
- minTableWidth () {
- return this.menuMode ? '200px' : this.minWidth
- },
scrollerStyle () {
- const style = { '--min-table-width': this.minTableWidth }
+ const style = { '--min-table-width': this.minWidth }
var rowCount = this.rowCount
if (this.pageMode) rowCount = -1
- else if (this.menuMode) rowCount = 6
+ else if (this.menuMode) rowCount = this.menuModeRowCount
if (rowCount > 0) style.height = (Math.max(Math.min(rowCount, this.filteredRows.length), 1) * 48 + 58) + 'px'
return style
},