mirror of
https://github.com/nasa/openmct.git
synced 2025-02-01 16:58:04 +00:00
fixed remove
This commit is contained in:
parent
621c1dc11e
commit
2d8f61172d
@ -37,6 +37,7 @@
|
||||
<ConditionEdit :condition-identifier="conditionIdentifier"
|
||||
:is-current="currentConditionIdentifier"
|
||||
@update-current-condition="updateCurrentCondition"
|
||||
@remove-condition="removeCondition"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
@ -136,8 +137,10 @@ export default {
|
||||
this.conditions[index] = updatedCondition;
|
||||
},
|
||||
removeCondition(identifier) {
|
||||
let index = _.findIndex(this.conditionCollection, (condition) => this.openmct.objects.makeKeyString(identifier) === condition.identifier.key);
|
||||
this.conditionCollection.splice(index, 1);
|
||||
let index = _.findIndex(this.conditionCollection, (condition) => {
|
||||
identifier.key === condition.key
|
||||
});
|
||||
this.conditionCollection.splice(index + 1, 1);
|
||||
},
|
||||
reorder(reorderPlan) {
|
||||
let oldConditions = this.conditionCollection.slice();
|
||||
|
@ -177,6 +177,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
removeCondition(ev) {
|
||||
this.$emit('remove-condition', this.conditionIdentifier);
|
||||
// const conditionDiv = ev.target.closest('.conditionArea');
|
||||
// const conditionCollectionDiv = conditionDiv.closest('.condition-collection');
|
||||
// const index = Array.from(conditionCollectionDiv.children).indexOf(conditionDiv);
|
||||
|
Loading…
x
Reference in New Issue
Block a user