Skip to content

Commit

Permalink
add isExecuting to isDisabled
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Oct 10, 2023
1 parent 24265cd commit dd12f75
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const GenericPressable = forwardRef((props, ref) => {
shouldBeDisabledByScreenReader = isScreenReaderActive;
}

return props.disabled || shouldBeDisabledByScreenReader;
return props.disabled || shouldBeDisabledByScreenReader || isExecuting;
}, [isScreenReaderActive, enableInScreenReaderStates, props.disabled, isExecuting]);

const shouldUseDisabledCursor = useMemo(() => isDisabled && !isExecuting, [isDisabled, isExecuting]);
Expand Down

0 comments on commit dd12f75

Please sign in to comment.