Browse Source

fix: keep the element reference and reset scrollTop on that

pull/7405/head
Pranav C 10 months ago
parent
commit
3ccf1dfd39
  1. 10
      packages/nc-gui/components/smartsheet/expanded-form/index.vue

10
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -469,12 +469,14 @@ const isReadOnlyVirtualCell = (column: ColumnType) => {
watch([expandedFormScrollWrapper, isLoading], () => {
if (isMobileMode.value) return
if (expandedFormScrollWrapper.value && !isLoading.value) {
const height = expandedFormScrollWrapper.value.scrollHeight
expandedFormScrollWrapper.value.scrollTop = height
const expandedFormScrollWrapperEl = expandedFormScrollWrapper.value
if (expandedFormScrollWrapperEl && !isLoading.value) {
const height = expandedFormScrollWrapperEl.scrollHeight
expandedFormScrollWrapperEl.scrollTop = height
setTimeout(() => {
expandedFormScrollWrapper.value.scrollTop = 0
expandedFormScrollWrapperEl.scrollTop = 0
}, 125)
}
})

Loading…
Cancel
Save