fix: finished/error states cannot be indeterminate

This commit is contained in:
Eric Liu 2023-02-18 16:47:40 -08:00
commit fdd57f02ba

View file

@ -48,7 +48,7 @@
let helperId = "ccs-" + Math.random().toString(36); let helperId = "ccs-" + Math.random().toString(36);
$: indeterminate = value === undefined; $: indeterminate = value === undefined && status === "active";
$: capped = value > max ? max : value < 0 ? 0 : value; $: capped = value > max ? max : value < 0 ? 0 : value;
</script> </script>
@ -89,9 +89,7 @@
> >
<div <div
class:bx--progress-bar__bar="{true}" class:bx--progress-bar__bar="{true}"
style="{!indeterminate && status === 'active' style:transform="{status === "active" && `scaleX(${capped / max})`}"
? `transform: scaleX(${capped / max})`
: ''}"
></div> ></div>
</div> </div>
{#if helperText} {#if helperText}