Skip to content

Commit

Permalink
Merge pull request #45594 from nextcloud/fix/files-active-entry
Browse files Browse the repository at this point in the history
fix(files): Ensure active file list entry is highlighted
  • Loading branch information
susnux authored May 31, 2024
2 parents 25f99a2 + a755651 commit 4a6ac1f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
7 changes: 0 additions & 7 deletions apps/files/src/components/FileEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,6 @@ export default defineComponent({
}
return ''
},

/**
* This entry is the current active node
*/
isActive() {
return this.fileid === this.currentFileId?.toString?.()
},
},

methods: {
Expand Down
8 changes: 4 additions & 4 deletions apps/files/src/components/FileEntryMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@

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'
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)

Expand Down Expand Up @@ -101,7 +101,7 @@ export default defineComponent({
},

isActive() {
return this.fileid?.toString?.() === this.currentFileId?.toString?.()
return String(this.fileid) === String(this.currentFileId)
},

canDrag() {
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 4a6ac1f

Please sign in to comment.