react-native-gifted-chat icon indicating copy to clipboard operation
react-native-gifted-chat copied to clipboard

Input ToolBar Is Not Rendering

Open jaskaur18 opened this issue 11 months ago • 1 comments

Issue Description

Input ToolBar Not Showing :(

Screenshot 2025-01-08 at 9 44 13 PM

Steps to Reproduce / Code Snippets

return ( <GiftedChat messages={messages} onSend={messages => onSend(messages)} renderInputToolbar={(props) => ( <InputToolbar {...props} containerStyle={{ backgroundColor: theme.color2.val }} /> )} renderComposer={(props) => ( <Composer {...props} placeholder="Type a message" placeholderTextColor={theme.color9.val} textInputStyle={{ color: theme.color12.val, // ...props.textInputStyle, }} textInputProps={{ autoFocus: false, ...props.textInputProps, }} /> )} />

Expected Results

it should show

  • Nodejs version: v22.9.0
  • React version: 18.3.1
  • React Native version: 0.76.5
  • react-native-gifted-chat version: 2.6.3
  • Platform(s) (iOS, Android, or both?): IOS
  • TypeScript version: 5.3.3
  • Expo - ^52.0.23

jaskaur18 avatar Jan 08 '25 16:01 jaskaur18

Same here, I've just upgrade to expo 52 + new architecture and now it happens :(

I'm using this code for now, I noticed if you force a render, it is going to appear:

try this:

  // just a path ---> TODO: delete this when library does not need it
  const IS_ANROID = Platform.OS === 'android'
  const [showChat, setShowChat] = useState(IS_ANDROID)

  useEffect(() => {
    if (IS_ANDROID) return

    const timeout = setTimeout(() => {
      setShowChat(true)
    }, 1000)

    return () => clearTimeout(timeout)
  }, [])

  if (!showChat) {
    return <Spinner />
  }

  // render your chat...

chrisdev3001 avatar Jan 17 '25 01:01 chrisdev3001

Should be fixed in master

kesha-antonov avatar Nov 19 '25 20:11 kesha-antonov