Skip to content

Commit fa0a8f9

Browse files
Add justification comment for eslint-disable on isAriaDisabled
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
1 parent e3e3d6a commit fa0a8f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/components/Pressable/GenericPressable/implementation

src/components/Pressable/GenericPressable/implementation/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function WebGenericPressable({focusable = true, ref, sentryLabel, ...props}: Pre
1111
// overriding any explicit aria-disabled we pass. We pass fullDisabled (not isDisabled) to
1212
// preserve interaction/focus behavior, so we must set aria-disabled imperatively instead.
1313
const internalRef = useRef<View>(null);
14-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
14+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- `||` is intentional so that falsy values like empty string or 0 are treated as not-disabled
1515
const isAriaDisabled = props.fullDisabled || props.disabled || props.accessibilityState?.disabled;
1616
useLayoutEffect(() => {
1717
const el = internalRef.current as unknown as HTMLElement | null;

0 commit comments

Comments
 (0)