Should not show editable views for objects in flexible layout and display layout (#2304)

* fix issue where editable summary widget view shows up in display layout and flexible layout

* keep consistent kebab case for props
This commit is contained in:
Deep Tailor 2019-03-18 11:59:09 -07:00 committed by Andrew Henry
parent 6338bd1168
commit 95549f7be2
4 changed files with 15 additions and 5 deletions

View File

@ -27,6 +27,7 @@
:domain-object="domainObject"
:object-path="objectPath"
:has-frame="item.hasFrame"
:show-edit-view="false"
ref="objectFrame">
</object-frame>
</layout-frame>

View File

@ -36,6 +36,7 @@
:domain-object="domainObject"
:object-path="objectPath"
:has-frame="hasFrame"
:show-edit-view="false"
ref="objectFrame">
</object-frame>

View File

@ -42,9 +42,12 @@
</div>
</div>
</div>
<object-view class="c-so-view__object-view"
ref="objectView"
:object="domainObject"></object-view>
<object-view
class="c-so-view__object-view"
ref="objectView"
:object="domainObject"
:show-edit-view="showEditView">
</object-view>
</div>
</template>
@ -128,6 +131,10 @@
domainObject: Object,
objectPath: Array,
hasFrame: Boolean,
showEditView: {
type: Boolean,
default: () => true
}
},
components: {
ObjectView,

View File

@ -8,7 +8,8 @@ export default {
inject: ["openmct"],
props: {
view: String,
object: Object
object: Object,
showEditView: Boolean
},
destroyed() {
this.clear();
@ -79,7 +80,7 @@ export default {
}
if (provider.edit) {
if (provider.edit && this.showEditView) {
if (this.openmct.editor.isEditing()) {
this.currentView = provider.edit(this.currentObject);
} else {