Skip to content

Commit

Permalink
Merge pull request #45711 from nextcloud/fix/files-ref-type
Browse files Browse the repository at this point in the history
fix(files): Correctly type virtual files list ref type
  • Loading branch information
susnux authored Jun 7, 2024
2 parents 08baf17 + a6e0f08 commit e9705ec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 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
6 changes: 3 additions & 3 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit e9705ec

Please sign in to comment.