Explore/Loki: Fix scrolling of context when leaving context window (#25838)

* Fix jumping layout

* Update log row hover background only if context is not open
This commit is contained in:
Ivana Huckova 2020-06-29 18:24:08 +02:00 committed by GitHub
parent d1e6214a4a
commit 4488a4cd5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,19 +91,23 @@ class UnThemedLogRow extends PureComponent<Props, State> {
};
/**
* We are using onMouse events to change background of Log Details Table to hover-state-background when
* hovered over Log Row and vice versa. This can't be done with css because we use 2 separate table rows without common parent element.
* We are using onMouse events to change background of Log Details Table to hover-state-background when hovered over Log
* Row and vice versa, when context is not open. This can't be done with css because we use 2 separate table rows without common parent element.
*/
addHoverBackground = () => {
this.setState({
hasHoverBackground: true,
});
if (!this.state.showContext) {
this.setState({
hasHoverBackground: true,
});
}
};
clearHoverBackground = () => {
this.setState({
hasHoverBackground: false,
});
if (!this.state.showContext) {
this.setState({
hasHoverBackground: false,
});
}
};
toggleDetails = () => {