Skip to content

Commit

Permalink
save dataset on enter press (#4375)
Browse files Browse the repository at this point in the history
Co-authored-by: Cole Blanchard <[email protected]>
  • Loading branch information
blanchco and Cole Blanchard authored Aug 7, 2024
1 parent 0965c88 commit 1c94c5b
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,27 @@
</div>

<!-- Save as dialog -->
<Dialog v-model:visible="showSaveInput" :modal="true" :style="{ width: '50vw' }" header="Save as">
<div class="p-fluid mt-4">
<div class="p-field">
<tera-input-text id="name" v-model="saveAsName" placeholder="What do you want to call it?" />
</div>
</div>
<tera-modal v-if="showSaveInput" class="w-4">
<template #header>
<h4>Save as</h4>
</template>
<tera-input-text
id="name"
v-model="saveAsName"
placeholder="What do you want to call it?"
auto-focus
@keyup.enter="saveAsNewDataset()"
/>
<template #footer>
<Button label="Cancel" @click="showSaveInput = false" severity="secondary" outlined />
<Button label="Save" :disabled="!hasValidDatasetName" @click="saveAsNewDataset()" />
</template>
</Dialog>
</tera-modal>
</template>
<script setup lang="ts">
import { computed, onMounted, onUnmounted, ref, Ref, watch } from 'vue';
import Button from 'primevue/button';
import Dialog from 'primevue/dialog';
import TeraModal from '@/components/widgets/tera-modal.vue';
import TeraInputText from '@/components/widgets/tera-input-text.vue';
import { useToastService } from '@/services/toast';
import { IModel } from '@jupyterlab/services/lib/session/session';
Expand Down

0 comments on commit 1c94c5b

Please sign in to comment.