[Logs UI] Revert unintended inversion of loading state meaning (#33152)

This fixes a problem introduced with #32009, in which the meaning of the `isLoading` property for the `<ProgressEntry>` component was inverted.
This commit is contained in:
Felix Stürmer 2019-03-18 13:28:15 +01:00 committed by GitHub
parent 0f17fbc6cd
commit 76eff0afab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,20 +115,12 @@ interface ProgressEntryProps {
class ProgressEntry extends React.PureComponent<ProgressEntryProps, {}> {
public render() {
const { alignment, children, className, color, isLoading } = this.props;
const progressProps = {};
// NOTE: styled-components seems to make all props in EuiProgress required, so this
// style attribute hacking replaces styled-components here for now until that can be fixed
// see: https://github.com/elastic/eui/issues/1655
const alignmentStyle =
alignment === 'top' ? { top: 0, bottom: 'initial' } : { top: 'initial', bottom: 0 };
if (isLoading) {
// @ts-ignore
progressProps.max = 1;
// @ts-ignore
progressProps.value = 1;
}
return (
<ProgressEntryWrapper className={className}>
<EuiProgress
@ -136,7 +128,7 @@ class ProgressEntry extends React.PureComponent<ProgressEntryProps, {}> {
color={color}
size="xs"
position="absolute"
{...progressProps}
{...(!isLoading ? { max: 1, value: 1 } : {})}
/>
{children}
</ProgressEntryWrapper>