Skip to content

Commit

Permalink
fix placeholder color when value is empty at the beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Feb 5, 2024
1 parent 5b56c60 commit 37d6b31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MarkdownTextInput.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const MarkdownTextInput = React.forwardRef<TextInput, MarkdownTextInputProps>(
onSelectionChange,
onSubmitEditing,
placeholder,
placeholderTextColor = '#ccc',
placeholderTextColor = `rgba(0,0,0,0.2)`,
selectTextOnFocus,
spellCheck,
style = {},
Expand Down Expand Up @@ -369,7 +369,7 @@ const MarkdownTextInput = React.forwardRef<TextInput, MarkdownTextInputProps>(
updateTextColor(r, '');
};

if (value === undefined) {
if (value === '' || value === undefined) {
updateTextColor(r, r.innerText);
}
}
Expand Down

0 comments on commit 37d6b31

Please sign in to comment.