mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 21:53:08 +00:00
Merge pull request #2806 from nasa/preserve-user-input
Preserve user input when changing criterion comparison
This commit is contained in:
commit
389589d7f7
@ -20,8 +20,7 @@
|
||||
<span v-if="criterion.telemetry"
|
||||
class="c-cdef__control"
|
||||
>
|
||||
<select ref="metadataSelect"
|
||||
v-model="criterion.metadata"
|
||||
<select v-model="criterion.metadata"
|
||||
@change="updateOperations"
|
||||
>
|
||||
<option value="">- Select Field -</option>
|
||||
@ -208,8 +207,9 @@ export default {
|
||||
},
|
||||
updateOperationInputVisibility(ev) {
|
||||
if (ev) {
|
||||
this.criterion.input = this.enumerations.length ? [this.enumerations[0].value.toString()] : [];
|
||||
this.inputCount = 0;
|
||||
if (this.enumerations.length) {
|
||||
this.criterion.input = [this.enumerations[0].value.toString()];
|
||||
}
|
||||
this.persist();
|
||||
}
|
||||
for (let i = 0; i < this.filteredOps.length; i++) {
|
||||
@ -222,10 +222,8 @@ export default {
|
||||
clearDependentFields(el) {
|
||||
if (el === this.$refs.telemetrySelect) {
|
||||
this.criterion.metadata = '';
|
||||
this.criterion.operation = '';
|
||||
} else if (el === this.$refs.metadataSelect) {
|
||||
this.criterion.operation = '';
|
||||
}
|
||||
this.criterion.operation = '';
|
||||
this.criterion.input = [];
|
||||
this.inputCount = 0;
|
||||
},
|
||||
|
@ -82,7 +82,7 @@ export const OPERATIONS = [
|
||||
appliesTo: ['number'],
|
||||
inputCount: 2,
|
||||
getDescription: function (values) {
|
||||
return ' is between ' + values.join(', ') + ' and ' + values[1];
|
||||
return ' is between ' + values[0] + ' and ' + values[1];
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -94,7 +94,7 @@ export const OPERATIONS = [
|
||||
appliesTo: ['number'],
|
||||
inputCount: 2,
|
||||
getDescription: function (values) {
|
||||
return ' is not between ' + values.join(', ') + ' and ' + values[1];
|
||||
return ' is not between ' + values[0] + ' and ' + values[1];
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user