mirror of
https://github.com/nasa/openmct.git
synced 2025-03-11 06:54:01 +00:00
fixed filter field issue, and prevent elements pool from updating when selection has not changed (#2372)
This commit is contained in:
parent
9c9006d415
commit
548286bacd
@ -42,7 +42,10 @@
|
|||||||
|
|
||||||
<!-- Checkbox list, NOT editing -->
|
<!-- Checkbox list, NOT editing -->
|
||||||
<template v-if="filter.possibleValues && !isEditing">
|
<template v-if="filter.possibleValues && !isEditing">
|
||||||
<span>{{persistedFilters[filter.comparator].join(', ')}}</span>
|
<span
|
||||||
|
v-if="persistedFilters[filter.comparator]">
|
||||||
|
{{persistedFilters[filter.comparator].join(', ')}}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -69,16 +69,17 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!this.updatedFilters[key]) {
|
if (!this.updatedFilters[key]) {
|
||||||
this.updatedFilters[key] = {};
|
this.$set(this.updatedFilters, key, {});
|
||||||
}
|
}
|
||||||
this.updatedFilters[key][comparator] = [value ? valueName : undefined];
|
this.$set(this.updatedFilters[key], comparator, [value ? valueName : undefined]);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$emit('updateFilters', this.keyString, this.updatedFilters);
|
this.$emit('updateFilters', this.keyString, this.updatedFilters);
|
||||||
},
|
},
|
||||||
updateTextFilter(key, comparator, value) {
|
updateTextFilter(key, comparator, value) {
|
||||||
if (!this.updatedFilters[key]) {
|
if (!this.updatedFilters[key]) {
|
||||||
this.updatedFilters[key] = {};
|
this.$set(this.updatedFilters, key, {});
|
||||||
|
this.$set(this.updatedFilters[key], comparator, '');
|
||||||
}
|
}
|
||||||
this.updatedFilters[key][comparator] = value;
|
this.updatedFilters[key][comparator] = value;
|
||||||
this.$emit('updateFilters', this.keyString, this.updatedFilters);
|
this.$emit('updateFilters', this.keyString, this.updatedFilters);
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
import _ from 'lodash';
|
||||||
import Search from '../components/search.vue';
|
import Search from '../components/search.vue';
|
||||||
import ObjectLabel from '../components/ObjectLabel.vue';
|
import ObjectLabel from '../components/ObjectLabel.vue';
|
||||||
|
|
||||||
@ -82,7 +83,8 @@ export default {
|
|||||||
isEditing: this.openmct.editor.isEditing(),
|
isEditing: this.openmct.editor.isEditing(),
|
||||||
parentObject: undefined,
|
parentObject: undefined,
|
||||||
currentSearch: '',
|
currentSearch: '',
|
||||||
isDragging: false
|
isDragging: false,
|
||||||
|
selection: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -99,6 +101,10 @@ export default {
|
|||||||
this.showSelection(this.openmct.selection.get());
|
this.showSelection(this.openmct.selection.get());
|
||||||
},
|
},
|
||||||
showSelection(selection) {
|
showSelection(selection) {
|
||||||
|
if (_.isEqual(this.selection, selection)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.selection = selection;
|
||||||
this.elements = [];
|
this.elements = [];
|
||||||
this.elementsCache = {};
|
this.elementsCache = {};
|
||||||
this.listeners = [];
|
this.listeners = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user