【问题标题】:How to change the returnKeyType in react-native-gifted-chat?如何更改 react-native-gifted-chat 中的 returnKeyType?
【发布时间】:2021-10-03 12:56:57
【问题描述】:

我使用来自 react-native-gifted-chat 的 GiftedChat,并使用 InputToolbar 组件来设置输入的样式。我的问题是我不能用它来改变键盘上的“输入”按钮。我应该使用 TextInput 并为发送而不是 InputToolbar 创建一个单独的按钮吗?

【问题讨论】:

    标签: react-native react-native-gifted-chat


    【解决方案1】:

    我找到了答案,但我不会删除这个问题,因为我花了一段时间才找到一个。 您可以在 InputToolbar 组件中添加 textInputProps:

     <InputToolbar
            textInputProps={{returnKeyType: 'send'}}
     />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-12
      • 1970-01-01
      • 2022-07-11
      • 2020-10-28
      • 1970-01-01
      相关资源
      最近更新 更多