mirror of
https://github.com/apache/superset.git
synced 2026-06-01 13:49:21 +00:00
committed by
GitHub
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user