Added editing support to the View API (#2279)
* Added edit to view API * Fixed listener deregistration bug
This commit is contained in:
committed by
Pegah Sarram
parent
d0ab59f9da
commit
853764d863
@@ -47,8 +47,13 @@ define([
|
||||
let table = new TelemetryTable(domainObject, openmct);
|
||||
let component;
|
||||
return {
|
||||
show: function (element) {
|
||||
show: function (element, isEditing) {
|
||||
component = new Vue({
|
||||
data() {
|
||||
return {
|
||||
isEditing: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
TableComponent: TableComponent.default,
|
||||
},
|
||||
@@ -58,9 +63,12 @@ define([
|
||||
table
|
||||
},
|
||||
el: element,
|
||||
template: '<table-component></table-component>'
|
||||
template: '<table-component :isEditing="isEditing"></table-component>'
|
||||
});
|
||||
},
|
||||
onEditModeChange(isEditing) {
|
||||
component.isEditing = isEditing;
|
||||
},
|
||||
destroy: function (element) {
|
||||
component.$destroy();
|
||||
component = undefined;
|
||||
|
||||
Reference in New Issue
Block a user