Merge pull request #45711 from nextcloud/fix/files-ref-type

fix(files): Correctly type virtual files list ref type
This commit is contained in:
Ferdinand Thiessen 2024-06-07 20:28:07 +02:00 committed by GitHub
commit e9705ec7d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 6 deletions

View file

@ -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'
@ -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
}
},

6
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long