Merge pull request #45594 from nextcloud/fix/files-active-entry

fix(files): Ensure active file list entry is highlighted
This commit is contained in:
Ferdinand Thiessen 2024-05-31 12:17:42 +02:00 committed by GitHub
commit 4a6ac1f1aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 15 deletions

View file

@ -219,13 +219,6 @@ export default defineComponent({
}
return ''
},
/**
* This entry is the current active node
*/
isActive() {
return this.fileid === this.currentFileId?.toString?.()
},
},
methods: {

View file

@ -5,11 +5,12 @@
import type { PropType } from 'vue'
import { extname } from 'path'
import { showError } from '@nextcloud/dialogs'
import { FileType, Permission, Folder, File as NcFile, NodeStatus, Node, View } from '@nextcloud/files'
import { generateUrl } from '@nextcloud/router'
import { translate as t } from '@nextcloud/l10n'
import { generateUrl } from '@nextcloud/router'
import { vOnClickOutside } from '@vueuse/components'
import { extname } from 'path'
import Vue, { defineComponent } from 'vue'
import { action as sidebarAction } from '../actions/sidebarAction.ts'
@ -17,7 +18,6 @@ import { getDragAndDropPreview } from '../utils/dragUtils.ts'
import { hashCode } from '../utils/hashUtils.ts'
import { dataTransferToFileTree, onDropExternalFiles, onDropInternalFiles } from '../services/DropService.ts'
import logger from '../logger.js'
import { showError } from '@nextcloud/dialogs'
Vue.directive('onClickOutside', vOnClickOutside)
@ -101,7 +101,7 @@ export default defineComponent({
},
isActive() {
return this.fileid?.toString?.() === this.currentFileId?.toString?.()
return String(this.fileid) === String(this.currentFileId)
},
canDrag() {

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