mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
perf(UI): resize results table on filters change
This commit is contained in:
@ -132,6 +132,7 @@
|
|||||||
v-if="isSearch"
|
v-if="isSearch"
|
||||||
:fields="fields"
|
:fields="fields"
|
||||||
@filter="updateFilters"
|
@filter="updateFilters"
|
||||||
|
@filter-change="resizeScroller"
|
||||||
/>
|
/>
|
||||||
<div class="workspace-query-results p-relative column col-12">
|
<div class="workspace-query-results p-relative column col-12">
|
||||||
<BaseLoader v-if="isQuering" />
|
<BaseLoader v-if="isQuering" />
|
||||||
@ -293,6 +294,7 @@ export default {
|
|||||||
this.filters = [];
|
this.filters = [];
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
}
|
}
|
||||||
|
this.resizeScroller();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@ -436,6 +438,9 @@ export default {
|
|||||||
downloadTable (format) {
|
downloadTable (format) {
|
||||||
this.$refs.queryTable.downloadTable(format, this.table);
|
this.$refs.queryTable.downloadTable(format, this.table);
|
||||||
},
|
},
|
||||||
|
resizeScroller () {
|
||||||
|
setTimeout(() => this.$refs.queryTable.refreshScroller(), 1);
|
||||||
|
},
|
||||||
updateFilters (clausoles) {
|
updateFilters (clausoles) {
|
||||||
this.filters = clausoles;
|
this.filters = clausoles;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
class="workspace-table-filters-row"
|
class="workspace-table-filters-row"
|
||||||
>
|
>
|
||||||
<label class="form-checkbox my-0" :title="$t('word.insert')">
|
<label class="form-checkbox my-0">
|
||||||
<input
|
<input
|
||||||
v-model="row.active"
|
v-model="row.active"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@ -89,10 +89,13 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
addRow () {
|
addRow () {
|
||||||
this.rows.push({ active: true, field: this.fields[0].name, op: '=', value: '', value2: '' });
|
this.rows.push({ active: true, field: this.fields[0].name, op: '=', value: '', value2: '' });
|
||||||
|
this.$emit('filter-change');
|
||||||
},
|
},
|
||||||
removeRow (i) {
|
removeRow (i) {
|
||||||
if (this.rows.length >= 2)
|
if (this.rows.length >= 2) {
|
||||||
this.rows = this.rows.filter((_, idx) => idx !== i);
|
this.rows = this.rows.filter((_, idx) => idx !== i);
|
||||||
|
this.$emit('filter-change');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
doFilter () {
|
doFilter () {
|
||||||
const clausoles = this.rows.filter(el => el.active).map(el => this.createClausole(el));
|
const clausoles = this.rows.filter(el => el.active).map(el => this.createClausole(el));
|
||||||
|
@ -116,6 +116,11 @@ module.exports = {
|
|||||||
triggerFunction: 'Funzione di trigger | Funzioni di trigger',
|
triggerFunction: 'Funzione di trigger | Funzioni di trigger',
|
||||||
all: 'Tutto',
|
all: 'Tutto',
|
||||||
duplicate: 'Duplica',
|
duplicate: 'Duplica',
|
||||||
|
routine: 'Routine',
|
||||||
|
new: 'Nuovo',
|
||||||
|
history: 'Cronologia',
|
||||||
|
select: 'Seleziona',
|
||||||
|
passphrase: 'Passphrase',
|
||||||
filter: 'Filtra'
|
filter: 'Filtra'
|
||||||
},
|
},
|
||||||
message: {
|
message: {
|
||||||
|
Reference in New Issue
Block a user