Skip to content

Commit 832f80e

Browse files
committed
Fixed #17678
1 parent 53c9444 commit 832f80e

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Improved the performance of fetching nested values within content block fields. ([#17677](https://github.com/craftcms/cms/issues/17677))
77
- Fixed a bug where embedded element indexes were manipulating the window title. ([#17679](https://github.com/craftcms/cms/issues/17679))
88
- Fixed an error that could occur when rendering an Entries field. ([#17686](https://github.com/craftcms/cms/issues/17686))
9+
- Fixed a bug where element selection modals weren’t rendering elements in a structure view when they should have. ([#17678](https://github.com/craftcms/cms/issues/17678))
910

1011
## 5.8.11 - 2025-07-25
1112

src/web/assets/cp/dist/cp.js

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

src/web/assets/cp/dist/cp.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.

src/web/assets/cp/src/js/BaseElementIndex.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Craft.BaseElementIndex = Garnish.Base.extend(
111111
nestedInputNamespace: null,
112112

113113
get viewMode() {
114-
if (this._viewMode === 'structure' && !this.canSort) {
114+
if (this._viewMode === 'structure' && !this.canViewAsStructure) {
115115
return this.doesSourceHaveViewMode('table') ? 'table' : 'cards';
116116
}
117117

@@ -143,6 +143,16 @@ Craft.BaseElementIndex = Garnish.Base.extend(
143143
return this.settings.sortable && this.canSort && !this.inlineEditing;
144144
},
145145

146+
get canViewAsStructure() {
147+
return (
148+
!this.status &&
149+
!this.trashed &&
150+
!this.drafts &&
151+
!this.searching &&
152+
!this.hasActiveFilter
153+
);
154+
},
155+
146156
get canSort() {
147157
return (
148158
this.isAdministrative &&

0 commit comments

Comments
 (0)