Skip to content

Commit

Permalink
fix(files): Correctly type virtual files list ref type
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Jun 7, 2024
1 parent 3237123 commit a69f383
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/files/src/views/FilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
import type { View, ContentsWithRoot } from '@nextcloud/files'
import type { Upload } from '@nextcloud/upload'
import type { CancelablePromise } from 'cancelable-promise'
import type { ComponentPublicInstance } from 'vue'
import type { Route } from 'vue-router'
import type { UserConfig } from '../types.ts'

Expand Down Expand Up @@ -455,8 +456,9 @@ export default defineComponent({
this.fetchContent()

// Scroll to top, force virtual scroller to re-render
if (this.$refs?.filesListVirtual?.$el) {
this.$refs.filesListVirtual.$el.scrollTop = 0
const filesListVirtual = this.$refs?.filesListVirtual as ComponentPublicInstance<typeof FilesListVirtual> | undefined
if (filesListVirtual?.$el) {
filesListVirtual.$el.scrollTop = 0
}
},

Expand Down

0 comments on commit a69f383

Please sign in to comment.