Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Input.TextArea的placeholder在value设置(setState的方式)为空后不显示 #1400

Open
1 task done
Escaay opened this issue Dec 5, 2024 · 2 comments
Open
1 task done
Labels

Comments

@Escaay
Copy link

Escaay commented Dec 5, 2024

💬 前提强调

  • I have searched the issues of this repository and believe that this is not a duplicate.

🙋 描述详情/重现步骤

<Input.TextArea placeholder={textAreaPlaceHolder} autoSize ref={textAreaRef} value={contentValue} onChange={e => { setContentValue(e.target.value); }} style={{ width: screenWidth * 0.67, backgroundColor: 'white', borderWidth: 1, borderColor: 'rgba(0,0,0,0.3)', borderRadius: 10, marginHorizontal: 6, }}></Input.TextArea>
setContentValue('')之后不会显示placeholader的内容,只有在手动把输入框的内容全部删除,才会显示placeholder的内容
25a5e60eee170c67b3e27c76a080c0a
473dccfefa34292093b3ebad4e7825f

🔴 版本

5.2.3

💻 运行环境

Android

⚫️ npx react-native info输出信息

补充说明

源文件链接:https://github.com/Escaay/EarthVillage/blob/main/pages/article/articleDetail/index.tsx

@Escaay Escaay added the Bug🐛 label Dec 5, 2024
@Escaay
Copy link
Author

Escaay commented Dec 5, 2024

刚才换成reactnative原生的TextInput试了一下,相同的代码TextInput在清空输入框后是可以显示placeholder的,应该是组件的问题

@1uokun
Copy link
Collaborator

1uokun commented Dec 6, 2024

未能复现,请提供一个最小单元的测试用例

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants