Skip to content

Commit bbc27e1

Browse files
committed
fix(react-native): treat undefined placeholder as absent to avoid incorrect iOS lineHeight workaround (hasPlaceholder uses != null)
1 parent 80a5d48 commit bbc27e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/design-system-react-native/src/components/Input

packages/design-system-react-native/src/components/Input/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const Input = forwardRef<TextInput, InputProps>(
4848
const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];
4949
const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];
5050
const fontClass = `font-${FontFamily.Default}${fontSuffix}`;
51-
const hasPlaceholder = placeholder !== null && placeholder !== '';
51+
const hasPlaceholder = placeholder != null && placeholder !== '';
5252
// Treat empty controlled values as placeholder-visible so the iOS
5353
// placeholder alignment workaround applies during placeholder-to-text
5454
// transitions.

0 commit comments

Comments
 (0)