I'm trying to create a TextInput component that is both editable and has clickable urls. According to the react native docs, the dataDetectorTypes prop is only supported when editable={false}.
Determines the types of data converted to clickable URLs in the text input. Only valid if multiline={true} and editable={false}.
Has anyone found a way around this limitation? It seems like it should be possible. The behavior I want is...
- Tapping on the url should open it in a browser
- Tapping anywhere else should start editing at that position
- It's ok if the link is no longer clickable when the TextInput currently has focus
The only thing I can think of to get around this is to store the
editablevalue in state and then upon clicking someEditbutton will change the state fromeditableto true.onBlurwould switch this state back tofalseI haven't tried this before though so just a suggestion on attempting workarounds or finding some middle ground between the two.