Skip to content

Commit 3a9a6f0

Browse files
Ensure that .modal-actions is visible after entities CSV is selected (#980)
Closes getodk/central#639.
1 parent bf55531 commit 3a9a6f0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/entity/upload.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ except according to the terms contained in the LICENSE file.
6565
:progress="uploadProgress" @clear="clearFile"
6666
@animationstart="animatePopup(true)"
6767
@animationend="animatePopup(false)"/>
68-
<div class="modal-actions">
68+
<div ref="actions" class="modal-actions">
6969
<button type="button" class="btn btn-primary"
7070
:aria-disabled="csvEntities == null || uploading" @click="upload">
7171
{{ $t('action.append') }}
@@ -350,6 +350,11 @@ const resizeColumnUnlessAnimating = () => {
350350
};
351351
useEventListener(window, 'resize', resizeColumnUnlessAnimating);
352352
353+
const actions = ref(null);
354+
watch(csvEntities, (value) => {
355+
if (value != null) nextTick(() => { actions.value.scrollIntoView(); });
356+
});
357+
353358
watch(() => props.state, (state) => {
354359
if (!state) {
355360
for (const table of tables) table.resetScroll();

0 commit comments

Comments
 (0)