Fix the issue with cutoff CustomScrollbar (#75929)

* Remove autoHeightMin

* Fix scroll to the top
This commit is contained in:
Haris Rozajac
2023-10-06 06:49:14 -06:00
committed by GitHub
parent 259bc437cf
commit e773f999ff
2 changed files with 3 additions and 4 deletions

View File

@@ -509,14 +509,13 @@ export class Explore extends React.PureComponent<Props, ExploreState> {
return (
<>
<ExploreToolbar exploreId={exploreId} onChangeTime={this.onChangeTime} topOfViewRef={this.topOfViewRef} />
<ExploreToolbar exploreId={exploreId} onChangeTime={this.onChangeTime} />
<CustomScrollbar
testId={selectors.pages.Explore.General.scrollView}
autoHeightMin={'100%'}
scrollRefCallback={(scrollElement) => (this.scrollElement = scrollElement || undefined)}
>
{datasourceInstance ? (
<div className={styles.exploreContainer}>
<div className={styles.exploreContainer} ref={this.topOfViewRef}>
<PanelContainer className={styles.queryContainer}>
{correlationsBox}
<QueryRows exploreId={exploreId} />

View File

@@ -54,7 +54,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
interface Props {
exploreId: string;
onChangeTime: (range: RawTimeRange, changedByScanner?: boolean) => void;
topOfViewRef: RefObject<HTMLDivElement>;
topOfViewRef?: RefObject<HTMLDivElement>;
}
export function ExploreToolbar({ exploreId, topOfViewRef, onChangeTime }: Props) {