Skip to content
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

Add explore control tabOverride at the section level #9495

Merged
merged 1 commit into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ class ControlPanelsContainer extends React.Component {
const querySectionsToRender = [];
const displaySectionsToRender = [];
allSectionsToRender.forEach(section => {
// if at least one control in the secion is not `renderTrigger`
// or asks to be displayed at the Data tab
if (
section.tabOverride === 'data' ||
Copy link
Contributor

@michellethomas michellethomas Apr 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lines 208-210 below should be changed to account for control potentially being a string or an object, right? I wouldn't block this PR on that change since we want to get the fix in, just making a note because it might cause this issue again in the future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should preprocess the configs at some point and avoid accounting for two types. I'll see what I can do later.

section.controlSetRows.some(rows =>
rows.some(
control =>
Expand Down
1 change: 1 addition & 0 deletions superset-frontend/src/explore/controlPanels/BigNumber.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default {
},
{
label: t('Options'),
tabOverride: 'data',
expanded: true,
controlSetRows: [
[
Expand Down