mirror of
https://github.com/nasa/openmct.git
synced 2024-12-18 20:57:53 +00:00
[Filters] Fix view based filters when string input is enabled (#7050)
* de-reactifying some objects for clarity, handling strings for filters, some vue 3 formatting * removing debug, fixing string value persistence * remove unnecessary change * removing vue utils from non vue files * nipping proxy objects in the bud * linting --------- Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
This commit is contained in:
parent
8f92cd4206
commit
7bf983210c
@ -39,8 +39,8 @@
|
||||
type="text"
|
||||
:aria-label="label"
|
||||
:disabled="useGlobal"
|
||||
:value="persistedValue(filter)"
|
||||
@change="updateFilterValueFromString($event, filter)"
|
||||
:value="persistedValue(filter.comparator)"
|
||||
@change="updateFilterValueFromString($event, filter.comparator)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
<script>
|
||||
import _ from 'lodash';
|
||||
import { toRaw } from 'vue';
|
||||
|
||||
import FilterObject from './FilterObject.vue';
|
||||
import GlobalFilters from './GlobalFilters.vue';
|
||||
@ -267,14 +268,14 @@ export default {
|
||||
this.openmct.objects.mutate(
|
||||
this.providedObject,
|
||||
'configuration.filters',
|
||||
this.persistedFilters
|
||||
toRaw(this.persistedFilters)
|
||||
);
|
||||
},
|
||||
mutateConfigurationGlobalFilters() {
|
||||
this.openmct.objects.mutate(
|
||||
this.providedObject,
|
||||
'configuration.globalFilters',
|
||||
this.globalFilters
|
||||
toRaw(this.globalFilters)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,9 @@ export default {
|
||||
},
|
||||
getFilterLabels(filterObject, metadatum) {
|
||||
let filterLabels = [];
|
||||
|
||||
Object.values(filterObject).forEach((comparator) => {
|
||||
if (typeof comparator !== 'string') {
|
||||
comparator.forEach((filterValue) => {
|
||||
metadatum.filters[0].possibleValues.forEach((option) => {
|
||||
if (option.value === filterValue) {
|
||||
@ -165,6 +167,9 @@ export default {
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
filterLabels.push(comparator);
|
||||
}
|
||||
});
|
||||
|
||||
return filterLabels;
|
||||
|
Loading…
Reference in New Issue
Block a user