mirror of
https://github.com/nasa/openmct.git
synced 2025-02-18 16:40:58 +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 -->
|
||||
<template v-if="filter.possibleValues && !isEditing">
|
||||
<span>{{persistedFilters[filter.comparator].join(', ')}}</span>
|
||||
<span
|
||||
v-if="persistedFilters[filter.comparator]">
|
||||
{{persistedFilters[filter.comparator].join(', ')}}
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -69,16 +69,17 @@ export default {
|
||||
}
|
||||
} else {
|
||||
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);
|
||||
},
|
||||
updateTextFilter(key, comparator, value) {
|
||||
if (!this.updatedFilters[key]) {
|
||||
this.updatedFilters[key] = {};
|
||||
this.$set(this.updatedFilters, key, {});
|
||||
this.$set(this.updatedFilters[key], comparator, '');
|
||||
}
|
||||
this.updatedFilters[key][comparator] = value;
|
||||
this.$emit('updateFilters', this.keyString, this.updatedFilters);
|
||||
|
@ -67,6 +67,7 @@
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import _ from 'lodash';
|
||||
import Search from '../components/search.vue';
|
||||
import ObjectLabel from '../components/ObjectLabel.vue';
|
||||
|
||||
@ -82,7 +83,8 @@ export default {
|
||||
isEditing: this.openmct.editor.isEditing(),
|
||||
parentObject: undefined,
|
||||
currentSearch: '',
|
||||
isDragging: false
|
||||
isDragging: false,
|
||||
selection: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -99,6 +101,10 @@ export default {
|
||||
this.showSelection(this.openmct.selection.get());
|
||||
},
|
||||
showSelection(selection) {
|
||||
if (_.isEqual(this.selection, selection)) {
|
||||
return;
|
||||
}
|
||||
this.selection = selection;
|
||||
this.elements = [];
|
||||
this.elementsCache = {};
|
||||
this.listeners = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user