+
-
+
-
+
{{ column.title }}
onSortTypeChange({
@@ -68,7 +60,9 @@
:filter-key="column.key || i"
:filter-items="column.filterItems"
:filter-multiple="column.filterMultiple || false"
- @on-filter="({value,key,filterFn}) => onFilter(value,key, filterFn)"
+ @on-filter="
+ ({ value, key, filterFn }) => onFilter(value, key, filterFn)
+ "
/>
-
-
+
+
-
+
No data
@@ -124,10 +112,8 @@
v-if="pagination !== false && showingData.length"
class="n-advanced-table__pagination"
>
-
+
@@ -180,6 +166,10 @@ export default {
type: Function,
default: null
},
+ minHeight: {
+ type: [Number, String],
+ default: 'unset'
+ },
maxHeight: {
type: [Number, String],
default: 'auto'
@@ -275,6 +265,12 @@ export default {
? this.maxWidth + 'px'
: this.maxWidth
}
+ if (this.minHeight !== 'unset') {
+ stl.minHeight =
+ typeof this.minHeight === 'number'
+ ? this.minHeight + 'px'
+ : this.minHeight
+ }
return stl
},
colGroup () {
@@ -474,7 +470,7 @@ export default {
let { sortable, key, type, column } = this.currentSortColumn
// use remote sort
if (sortable === true) {
- if (!this.searchDataNoSort) {
+ if (!this.searchDataNoSort && this.data.length !== 0) {
this.searchDataNoSort = data.slice(0)
}
if (type === 0) {
diff --git a/styles/AdvancedTable.scss b/styles/AdvancedTable.scss
index 03f29850c..13c94b8bf 100644
--- a/styles/AdvancedTable.scss
+++ b/styles/AdvancedTable.scss
@@ -19,14 +19,17 @@
background: transparent;
}
&::-webkit-scrollbar-thumb {
- background: rgba(255,255,255,0.2);
+ background: rgba(255, 255, 255, 0.2);
border-radius: 2.5px;
}
&::-webkit-scrollbar-thumb:hover {
- background: rgba(255,255,255,0.3);
+ background: rgba(255, 255, 255, 0.3);
}
- &::-webkit-scrollbar-corner{
- background: transparent
+ &::-webkit-scrollbar-corner {
+ background: transparent;
+ }
+ &::-webkit-scrollbar:horizontal {
+ height: 5px;
}
table thead tr th:last-of-type {
padding-left: 32px;
@@ -37,14 +40,14 @@
display: flex;
justify-content: flex-end;
}
- .n-advance-table__operation{
+ .n-advance-table__operation {
display: flex;
justify-content: space-between;
}
- .n-no-data-tip{
+ .n-no-data-tip {
padding: 5px;
text-align: center;
width: 100%;
display: table-cell;
}
-}
\ No newline at end of file
+}