ada*_*amF 6 textinput datadetectortypes react-native
我正在尝试创建一个可编辑且具有可点击网址的 TextInput 组件。根据 react native docs,仅当 editable={false} 时才支持 dataDetectorTypes 属性。
Determines the types of data converted to clickable URLs in the text input. Only valid if multiline={true} and editable={false}.
Run Code Online (Sandbox Code Playgroud)
有没有人找到解决这个限制的方法?好像应该是可以的。我想要的行为是...
我能想到的解决这个问题的唯一方法是将editable值存储在状态中,然后单击某个Edit按钮会将状态从状态更改editable为 true。
onBlur会将此状态切换回false
我之前没有尝试过,所以只是建议尝试解决方法或在两者之间找到一些中间立场。
| 归档时间: |
|
| 查看次数: |
557 次 |
| 最近记录: |