mirror of https://github.com/apache/superset.git
parent
fe581a3640
commit
e2206a7151
|
@ -26,7 +26,9 @@ import AsyncEsmComponent from 'src/components/AsyncEsmComponent';
|
|||
import { getChartKey } from 'src/explore/exploreUtils';
|
||||
import { runAnnotationQuery } from 'src/components/Chart/chartAction';
|
||||
import CustomListItem from 'src/explore/components/controls/CustomListItem';
|
||||
import ControlPopover from '../ControlPopover/ControlPopover';
|
||||
import ControlPopover, {
|
||||
getSectionContainerElement,
|
||||
} from '../ControlPopover/ControlPopover';
|
||||
|
||||
const AnnotationLayer = AsyncEsmComponent(
|
||||
() => import('./AnnotationLayer'),
|
||||
|
@ -114,6 +116,11 @@ class AnnotationLayerControl extends React.PureComponent {
|
|||
|
||||
removeAnnotationLayer(annotation) {
|
||||
const annotations = this.props.value.filter(anno => anno !== annotation);
|
||||
// So scrollbar doesnt get stuck on hidden
|
||||
const element = getSectionContainerElement();
|
||||
if (element) {
|
||||
element.style.setProperty('overflow-y', 'auto', 'important');
|
||||
}
|
||||
this.props.onChange(annotations);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import Popover, {
|
|||
} from 'src/components/Popover';
|
||||
|
||||
const sectionContainerId = 'controlSections';
|
||||
const getSectionContainerElement = () =>
|
||||
export const getSectionContainerElement = () =>
|
||||
document.getElementById(sectionContainerId)?.lastElementChild as HTMLElement;
|
||||
|
||||
const getElementYVisibilityRatioOnContainer = (node: HTMLElement) => {
|
||||
|
|
Loading…
Reference in New Issue