mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix disabled behavior
Summary: Changelog: [General][Fixed] - Pass disabled prop to pressability config Reviewed By: kacieb Differential Revision: D26590399 fbshipit-source-id: dd4f8f25d1b243b2983cd4ffaadb5d3dc6f3ed3e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c4aa411ee3
commit
33ff4445dc
@@ -48,7 +48,10 @@ const Text: React.AbstractComponent<
|
||||
const [isHighlighted, setHighlighted] = useState(false);
|
||||
|
||||
const isPressable =
|
||||
onPress != null || onLongPress != null || onStartShouldSetResponder != null;
|
||||
(onPress != null ||
|
||||
onLongPress != null ||
|
||||
onStartShouldSetResponder != null) &&
|
||||
restProps.disabled !== true;
|
||||
|
||||
const initialized = useLazyInitialization(isPressable);
|
||||
const config = useMemo(
|
||||
|
||||
Reference in New Issue
Block a user