question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does bottomOffset do anything?

See original GitHub issue

Issue Description

Using the latest gifted chat, I’m rendering a custom composer (I’m making a chatbot that doesn’t allow text input, just canned button responses).

My composer height will be anywhere from 100 - 300px, and I want to push the chat ‘up’ so it’s all visible above the composer window.

I’m trying to use the bottomOffset param, like:

    <GiftedChat
      messages={messages}
      onSend={(messages) => onSend(messages)}
      user={currentUser}
      renderComposer={Composer}
      bottomOffset={300}
    />

Yet no matter what I change bottomOffset to, it does nothing. I’ve also tried doing this without a custom composer, and it still yields no results

I could just be dumb, but I’ve looked in the RN Gifted Chat repo and I can see bottomOffset defined in typescript, but can’t see it actually being called anywhere.

So: What’s the correct way to change the height of the chat stream in which the message bubbles appear? I basically just want a dynamically larger composer and to be able to make the chat stream sit neatly above it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

2reactions
jvgeeecommented, Mar 18, 2021

Got it. Maybe we need to update the readme documentation, as this is very unclear:

bottomOffset (Integer) - Distance of the chat from the bottom of the screen (e.g. useful if you display a tab bar)

I read this as… literally as written, “Distance of the chat from the bottom of the screen”. Nothing here states that the keyboard must be open. Cheers for your help!

0reactions
mariomurrent-softwaresolutionscommented, Mar 18, 2021

I had the same issue. Yeah maybe the documentation needs to be updated, or the implementation of this is not meant to be only working when the keyboard is open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working of the jQuery offset bottom - eduCBA
The jQuery offset() function is a built-in function in jQuery, by which we can return the offset of the bottom coordinate. The jQuery...
Read more >
UIScrollView scroll to bottom programmatically - Stack Overflow
You can use the UIScrollView's setContentOffset:animated: function to scroll to any part of the content view. Here's some code that would scroll to...
Read more >
offset-position - CSS: Cascading Style Sheets - MDN Web Docs
A position defines an x/y coordinate, to place an item relative to the edges of an element's box. It can be defined using...
Read more >
Customer reviews: Ruvati 30-inch Slope Bottom Offset Drain ...
My wife says the angle corner is hard to clean. I don't think it's a big deal. Also, stainless steel will get scratched...
Read more >
Ruvati Slope Bottom Offset Drain 16-Gauge Stainless Steel 30 ...
The sink is reversible, so you can install it with the drain on left side or right side. The bottom edges and corners...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found