feat: programmatically disable create button via API events

This commit is contained in:
Jesse Mazzella 2023-12-21 16:45:43 -08:00
parent f0f3733ac1
commit 86c2662148

View File

@ -23,6 +23,7 @@
<div ref="createButton" class="c-create-button--w">
<button
class="c-create-button c-button--menu c-button--major icon-plus"
:disabled="isEditing"
@click.prevent.stop="showCreateMenu"
>
<span class="c-button__label">Create</span>
@ -31,10 +32,19 @@
</template>
<script>
import { inject } from 'vue';
import CreateAction from '@/plugins/formActions/CreateAction';
import { useIsEditing } from '../composables/editor';
export default {
inject: ['openmct'],
setup() {
const openmct = inject('openmct');
const { isEditing } = useIsEditing(openmct);
return { isEditing };
},
data: function () {
return {
menuItems: {},