Skip to content

Commit

Permalink
[Uptime] Fix jerky monitor list expanded row behavior (#47080) (#47113)
Browse files Browse the repository at this point in the history
* [Uptime] Fix jerky monitor list expanded row behavior

Only set loading to true when there are no items present to prevent the bug outlined in
in elastic/eui#2393 . Once that is fixed we can simply set the value here to
loading={loading}

Fixes #46244

* Also fix loading state of charts to not move the table around
  • Loading branch information
andrewvc authored Oct 4, 2019
1 parent 6b1a189 commit 9f92083
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const ChartWrapper: FC<Props> = ({ loading = false, height = '100%', chil
<EuiFlexGroup
justifyContent="spaceAround"
alignItems="center"
style={{ height, marginTop: `-${height}` }}
style={{ height, marginTop: `-${height}`, marginBottom: 0 }}
>
<EuiFlexItem grow={false}>
<EuiLoadingChart size="xl" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ export const MonitorListComponent = (props: Props) => {
<EuiSpacer size="s" />
<EuiBasicTable
error={errors ? formatUptimeGraphQLErrorList(errors) : errors}
loading={loading}
// Only set loading to true when there are no items present to prevent the bug outlined in
// in https://github.com/elastic/eui/issues/2393 . Once that is fixed we can simply set the value here to
// loading={loading}
loading={loading && (!items || items.length < 1)}
isExpandable={true}
hasActions={true}
itemId="monitor_id"
Expand Down

0 comments on commit 9f92083

Please sign in to comment.