summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/DataTable.vue
diff options
context:
space:
mode:
authorUdo Walter2019-02-23 03:07:07 +0100
committerUdo Walter2019-02-23 03:07:07 +0100
commit558815d4e82e231a267b65de1bbf347a816e22d6 (patch)
tree615b7f207f385a6724a7e87f4cdfef89e9498e5f /webapp/src/components/DataTable.vue
parent[webapp/datatable] code cleanup (diff)
downloadbas-558815d4e82e231a267b65de1bbf347a816e22d6.tar.gz
bas-558815d4e82e231a267b65de1bbf347a816e22d6.tar.xz
bas-558815d4e82e231a267b65de1bbf347a816e22d6.zip
[webapp/datatable] fix filter by selected not working; add filtering indicator
Diffstat (limited to 'webapp/src/components/DataTable.vue')
-rw-r--r--webapp/src/components/DataTable.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/webapp/src/components/DataTable.vue b/webapp/src/components/DataTable.vue
index 7d2ff73..38c5dc9 100644
--- a/webapp/src/components/DataTable.vue
+++ b/webapp/src/components/DataTable.vue
@@ -144,7 +144,7 @@
</v-icon>
</div>
</div>
- <v-progress-linear v-if="loading" :indeterminate="true" :height="2" style="margin: 0"></v-progress-linear>
+ <v-progress-linear v-if="filteringLoop.running || loading" :indeterminate="true" :height="2" style="margin: 0"></v-progress-linear>
<div v-else class="header-separator"></div>
</div>
</template>
@@ -204,7 +204,7 @@ export default {
lastSelectIndex: null,
shiftKey: false,
filteredRows: [],
- filteringLoop: null
+ filteringLoop: { running: false, cancel: () => true }
}
},
computed: {
@@ -396,7 +396,7 @@ export default {
},
filterRows () {
// Cancel the last filtering loop
- if (this.filteringLoop) this.filteringLoop.cancel()
+ this.filteringLoop.cancel()
// Skip filtering if all search strings are empty
if (this.search.every(s => s.text.raw === '') && !this.onlyShowSelected) {
@@ -409,7 +409,7 @@ export default {
this.filteringLoop = this.$loop(this.sortedRows.length, 1000,
i => {
const row = this.sortedRows[i]
- if ((!this.onlySelected || (this.onlySelected && row.selected)) && this.search.every(s => {
+ if ((!this.onlyShowSelected || (this.onlyShowSelected && row.selected)) && this.search.every(s => {
if (s.key === null) {
return this.dataKeys.some(key => {
return this.filterFunction(s, String(row.data[key]))