mirror of
https://github.com/nasa/openmct.git
synced 2025-01-03 03:46:42 +00:00
[Tables] Do not persist column configuration for non-editable objects
This commit is contained in:
parent
3ae0fd7bc9
commit
3d3baddd23
@ -187,7 +187,9 @@ define(
|
|||||||
});
|
});
|
||||||
|
|
||||||
//Synchronize column configuration with model
|
//Synchronize column configuration with model
|
||||||
if (configChanged(configuration, defaultConfig)) {
|
if (this.domainObject.hasCapability('editor') &&
|
||||||
|
this.domainObject.getCapability('editor').isEditContextRoot() &&
|
||||||
|
configChanged(configuration, defaultConfig)) {
|
||||||
this.saveColumnConfiguration(configuration);
|
this.saveColumnConfiguration(configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,10 +35,18 @@ define(
|
|||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockDomainObject = jasmine.createSpyObj('domainObject',
|
mockDomainObject = jasmine.createSpyObj('domainObject',
|
||||||
['getModel', 'useCapability', 'getCapability']
|
['getModel', 'useCapability', 'getCapability', 'hasCapability']
|
||||||
);
|
);
|
||||||
mockModel = {};
|
mockModel = {};
|
||||||
mockDomainObject.getModel.andReturn(mockModel);
|
mockDomainObject.getModel.andReturn(mockModel);
|
||||||
|
mockDomainObject.getCapability.andCallFake(function (name) {
|
||||||
|
return name === 'editor' && {
|
||||||
|
isEditContextRoot: function () {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
mockTelemetryFormatter = jasmine.createSpyObj('telemetryFormatter',
|
mockTelemetryFormatter = jasmine.createSpyObj('telemetryFormatter',
|
||||||
[
|
[
|
||||||
'formatDomainValue',
|
'formatDomainValue',
|
||||||
|
Loading…
Reference in New Issue
Block a user