|
|
@ -776,9 +776,17 @@ eventBus.on(async (event, payload) => { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const closeAddColumnDropdown = () => { |
|
|
|
const closeAddColumnDropdown = (scrollToLastAddNewRowHeader = false) => { |
|
|
|
columnOrder.value = null |
|
|
|
columnOrder.value = null |
|
|
|
addColumnDropdown.value = false |
|
|
|
addColumnDropdown.value = false |
|
|
|
|
|
|
|
if (scrollToLastAddNewRowHeader) { |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
|
|
const lastAddNewRowHeader = tableHead.value?.querySelector('th:last-child') |
|
|
|
|
|
|
|
if (lastAddNewRowHeader) { |
|
|
|
|
|
|
|
lastAddNewRowHeader.scrollIntoView({ behavior: 'smooth' }) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, 200) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const confirmDeleteRow = (row: number) => { |
|
|
|
const confirmDeleteRow = (row: number) => { |
|
|
@ -889,8 +897,8 @@ function addEmptyRow(row?: number) { |
|
|
|
<SmartsheetColumnEditOrAddProvider |
|
|
|
<SmartsheetColumnEditOrAddProvider |
|
|
|
v-if="addColumnDropdown" |
|
|
|
v-if="addColumnDropdown" |
|
|
|
:column-position="columnOrder" |
|
|
|
:column-position="columnOrder" |
|
|
|
@submit="closeAddColumnDropdown" |
|
|
|
@submit="closeAddColumnDropdown(true)" |
|
|
|
@cancel="closeAddColumnDropdown" |
|
|
|
@cancel="closeAddColumnDropdown()" |
|
|
|
@click.stop |
|
|
|
@click.stop |
|
|
|
@keydown.stop |
|
|
|
@keydown.stop |
|
|
|
/> |
|
|
|
/> |
|
|
|