[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:
parent
0f17fbc6cd
commit
76eff0afab
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue