Skip to content

Commit

Permalink
dont use spinner on the reset button
Browse files Browse the repository at this point in the history
  • Loading branch information
danpriori committed Jun 28, 2024
1 parent 67a8b9d commit 06309dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export const RuleBasedOutputsButton = ({
checked={currentRuleSetEnabled === undefined || emptyRuleSelected?.isEnabled}
onChange={onChange}
isLoading={isRuleLoading}
isEmptyRuleItem={true}
/>
{ruleInstances?.map((item) => (
<RuleBasedSelectionItem
Expand All @@ -141,6 +142,7 @@ export const RuleBasedOutputsButton = ({
checked={item?.isEnabled}
onChange={onChange}
isLoading={isRuleLoading}
isEmptyRuleItem={false}
/>
))}
</Menu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type RuleBasedSelectionItemProps = {
checked: boolean | undefined;
key: string;
isLoading: boolean;
isEmptyRuleItem: boolean;
};
export const RuleBasedSelectionItem = ({
onChange,
Expand All @@ -20,6 +21,7 @@ export const RuleBasedSelectionItem = ({
id,
checked,
isLoading,
isEmptyRuleItem
}: RuleBasedSelectionItemProps): ReactElement => {
return (
<Menu.Item
Expand All @@ -32,7 +34,7 @@ export const RuleBasedSelectionItem = ({
<Icon type="ColorPalette" />
{label}
</Flex>
{isLoading && checked === true ? (
{!isEmptyRuleItem && isLoading && checked === true ? (
<Icon type="Loader" />
) : (
<Radio name={id ?? ''} value={id} checked={checked} />
Expand Down

0 comments on commit 06309dd

Please sign in to comment.