mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix: don't show filter popover on explore view load (#8729)
* fix: don't show filter popover on explore view load There's this confusing "feature" that I thought was a bug that shows the metric popover opened when entering the explore view when the filter comes from an active dashboard filter, based on the "fromFormData" attribute of the filter. The popover is confusing and often shows as misaligned with the actual element it's supposed to float over when overflowing. * warn * fix cypress * also shut off metrics
This commit is contained in:
parent
8b1022f66b
commit
9f16d053e1
@ -168,7 +168,7 @@ describe('AdhocFilters', () => {
|
||||
.trigger('mousedown')
|
||||
.click();
|
||||
});
|
||||
|
||||
cy.get('.adhoc-filter-option').click({ force: true });
|
||||
cy.get('#filter-edit-popover').within(() => {
|
||||
cy.get('[data-test=adhoc-filter-simple-value]').within(() => {
|
||||
cy.get('div.select-input').click({ force: true });
|
||||
@ -201,6 +201,7 @@ describe('AdhocFilters', () => {
|
||||
.click();
|
||||
});
|
||||
|
||||
cy.get('.adhoc-filter-option').click({ force: true });
|
||||
cy.get('#filter-edit-popover').within(() => {
|
||||
cy.get('#adhoc-filter-edit-tabs-tab-SQL').click();
|
||||
cy.get('.ace_content').click();
|
||||
|
@ -45,7 +45,7 @@ export default class AdhocFilterOption extends React.PureComponent {
|
||||
this.onPopoverResize = this.onPopoverResize.bind(this);
|
||||
this.onOverlayEntered = this.onOverlayEntered.bind(this);
|
||||
this.onOverlayExited = this.onOverlayExited.bind(this);
|
||||
this.state = { overlayShown: !this.props.adhocFilter.fromFormData };
|
||||
this.state = { overlayShown: false };
|
||||
}
|
||||
|
||||
onPopoverResize() {
|
||||
@ -90,7 +90,6 @@ export default class AdhocFilterOption extends React.PureComponent {
|
||||
overlay={overlay}
|
||||
rootClose
|
||||
shouldUpdatePosition
|
||||
defaultOverlayShown={!adhocFilter.fromFormData}
|
||||
onEntered={this.onOverlayEntered}
|
||||
onExited={this.onOverlayExited}
|
||||
>
|
||||
|
@ -39,7 +39,7 @@ export default class AdhocMetricOption extends React.PureComponent {
|
||||
this.onOverlayEntered = this.onOverlayEntered.bind(this);
|
||||
this.onOverlayExited = this.onOverlayExited.bind(this);
|
||||
this.onPopoverResize = this.onPopoverResize.bind(this);
|
||||
this.state = { overlayShown: !this.props.adhocMetric.fromFormData };
|
||||
this.state = { overlayShown: false };
|
||||
}
|
||||
|
||||
onPopoverResize() {
|
||||
@ -47,7 +47,7 @@ export default class AdhocMetricOption extends React.PureComponent {
|
||||
}
|
||||
|
||||
onOverlayEntered() {
|
||||
this.setState({ overlayShown: true });
|
||||
this.setState({ overlayShown: false });
|
||||
}
|
||||
|
||||
onOverlayExited() {
|
||||
|
Loading…
Reference in New Issue
Block a user