Skip to content

Commit 67dfc8d

Browse files
authored
Merge pull request #45598 from nextcloud/backport/45594/stable28
[stable28] fix(files): Ensure active file list entry is highlighted
2 parents 46bf8b8 + a87f425 commit 67dfc8d

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

apps/files/src/components/FileEntry.vue

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,6 @@ export default defineComponent({
236236
}
237237
return ''
238238
},
239-
240-
/**
241-
* This entry is the current active node
242-
*/
243-
isActive() {
244-
return this.fileid === this.currentFileId?.toString?.()
245-
},
246239
},
247240
248241
methods: {

apps/files/src/components/FileEntryMixin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@
2222

2323
import type { PropType } from 'vue'
2424

25-
import { extname } from 'path'
25+
import { showError } from '@nextcloud/dialogs'
2626
import { FileType, Permission, Folder, File as NcFile, NodeStatus, Node, View } from '@nextcloud/files'
27-
import { generateUrl } from '@nextcloud/router'
2827
import { translate as t } from '@nextcloud/l10n'
28+
import { generateUrl } from '@nextcloud/router'
2929
import { vOnClickOutside } from '@vueuse/components'
30+
import { extname } from 'path'
3031
import Vue, { defineComponent } from 'vue'
3132

3233
import { action as sidebarAction } from '../actions/sidebarAction.ts'
3334
import { getDragAndDropPreview } from '../utils/dragUtils.ts'
3435
import { hashCode } from '../utils/hashUtils.ts'
3536
import { dataTransferToFileTree, onDropExternalFiles, onDropInternalFiles } from '../services/DropService.ts'
3637
import logger from '../logger.js'
37-
import { showError } from '@nextcloud/dialogs'
3838

3939
Vue.directive('onClickOutside', vOnClickOutside)
4040

@@ -118,7 +118,7 @@ export default defineComponent({
118118
},
119119

120120
isActive() {
121-
return this.fileid?.toString?.() === this.currentFileId?.toString?.()
121+
return String(this.fileid) === String(this.currentFileId)
122122
},
123123

124124
canDrag() {

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)