当TextInput设置为editable=false时,是否有方法启用选择



我想知道你们中是否有人知道在editable={false}时使TextInput可选的方法。

谢谢。

这是React Native的当前行为
在使用Text的情况下,您可以使用fakeTextInput并使用selectable道具https://reactnative.dev/docs/text#selectable

或者类似的东西

this.state.editable ? <TextInput /> : <Text selectable={true} />;

最新更新