Skip to content

exculde hidden culomns #1694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/dashboard/Data/Browser/Browser.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import ParseApp from 'lib/ParseApp';

// The initial and max amount of rows fetched by lazy loading
const MAX_ROWS_FETCHED = 200;
const VERSION = 'v1';

export default
@subscribeTo('Schema', 'schema')
Expand Down Expand Up @@ -355,6 +356,14 @@ class Browser extends DashboardView {
}

query.limit(MAX_ROWS_FETCHED);
let columns = localStorage.getItem(`ParseDashboard:${VERSION}:${this.props.params.appId}:${source}`)
if (columns) {
columns = JSON.parse(columns)
columns = columns.filter(clmn => !clmn.visible).map(clmn => clmn.name)
for (let columnsKey in columns) {
query.exclude(columns[columnsKey])
}
}

let promise = query.find({ useMasterKey: true });
let isUnique = false;
Expand Down Expand Up @@ -451,6 +460,14 @@ class Browser extends DashboardView {
query.addDescending('createdAt');
}
query.limit(MAX_ROWS_FETCHED);
let columns = localStorage.getItem(`ParseDashboard:${VERSION}:${this.props.params.appId}:${source}`)
if (columns) {
columns = JSON.parse(columns)
columns = columns.filter(clmn => !clmn.visible).map(clmn => clmn.name)
for (let columnsKey in columns) {
query.exclude(columns[columnsKey])
}
}

query.find({ useMasterKey: true }).then((nextPage) => {
if (className === this.props.params.className) {
Expand Down Expand Up @@ -834,7 +851,7 @@ class Browser extends DashboardView {
showCloneSelectedRowsDialog: false
});
this.showNote(error.message, true);
}
}
}

getClassRelationColumns(className) {
Expand Down