Merge pull request #8468 from andrej-scinote/aj_SCI_11822

Hide card layouts [SCI-11822]
This commit is contained in:
andrej-scinote 2025-04-29 11:48:13 +02:00 committed by GitHub
commit 2c4ec9a251
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 12 deletions

View file

@ -10,7 +10,7 @@
:archivedPageUrl="archivedPageUrl"
:currentViewMode="currentViewMode"
:filters="filters"
:viewRenders="viewRenders"
:tableOnly="true"
:objectArchived="archived"
:hiddenDataMessage="i18n.t('projects.show.empty_state.no_active_experiment_archived_project')"
scrollMode="infinite"
@ -218,9 +218,6 @@ export default {
return columns;
},
viewRenders() {
return [{ type: 'table' }, { type: 'cards' }];
},
toolbarActions() {
const left = [];

View file

@ -10,7 +10,7 @@
:currentViewMode="currentViewMode"
scrollMode="infinite"
:filters="filters"
:viewRenders="viewRenders"
:tableOnly="true"
@tableReloaded="reloadingTable = false"
@comments="openComments"
@archive="archive"
@ -256,12 +256,6 @@ export default {
return columns;
},
viewRenders() {
return [
{ type: 'table' },
{ type: 'cards' }
];
},
toolbarActions() {
const left = [];
if (this.createUrl && this.currentViewMode !== 'archived') {

View file

@ -184,6 +184,10 @@ export default {
},
hiddenDataMessage: {
type: String
},
tableOnly: {
type: Boolean,
default: false
}
},
data() {
@ -403,7 +407,7 @@ export default {
.then((response) => {
if (response.data.data) {
this.tableState = response.data.data;
this.currentViewRender = this.tableState.currentViewRender;
this.currentViewRender = this.tableOnly ? 'table' : this.tableState.currentViewRender;
this.perPage = this.tableState.perPage;
this.order = this.tableState.order;
if (this.currentViewRender === 'cards') {