-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a prop for setting the style property. #6
Comments
I will add the style prop if you want it. But you can use any browser Does this answer your question? On Friday, January 8, 2016, Alex Klibisz [email protected] wrote:
|
@dustingetz Yes I tried to do Any thoughts on why that might be? |
Can I see a fiddle? If react-chatview is causing this, it is a bug. Any layout where you can make a regular old div do what you want, you should be able to replace that div with react-chatview and have exactly the same layout. react-chatview has no css dependencies and the only inline styles it sets are related to scrolling. |
Do you have a recommendation for how to pull react and your lib into a fiddle? Maybe a little boilerplate? I tried to recreate it with your example repo, but I'm not familiar at all with the react cursor stuff and ended up breaking it in different ways. |
Oh, sure, sorry. I'll get that sorted tomorrow afternoon. On Saturday, January 9, 2016, Alex Klibisz [email protected] wrote:
|
Here is a fiddle. https://jsfiddle.net/dustingetz/xvqzw747/ |
@alexklibisz any updates? can I close this? |
@dustingetz I'm going to try my best to get to it today. Still using your lib and this has been the only little issue. I just have a stack of other things on deck in this project at the moment. |
@dustingetz So I was able to work around the issue that required setting the height/width via style properties. However the scrolling issue remains and is demonstrated here: https://jsfiddle.net/aklibisz/hnvfuv8a/ Try to add some more lines within the input div at the bottom. You'll see how it grows upwards but covers up the last few messages. Thanks! |
Thank you for the fiddle! I understand what you mean now. Yes, this is a bug. You can also trigger it if a message's content resizes (e.g. is edited or an image loads) below the fold. It needs to be fixed, but I haven't put time into fixing it yet. I will probably invest more time in March. Is your workaround sufficient or do you need a fix sooner? |
And do I need to expose this.props.style - are you using a modified react-chatview? |
The work around is good enough for now. Could you give me the gist of what is going on? Maybe I could give it a try to fix it? I don't need the props.style exposed for my purposes at the moment. However, maybe you could consider adding |
It's going to be a hard problem to solve, everything about an infinite scroll component is a shitty problem. The source is only 140 lines though so you're welcome to take a look. |
I have a case where I would like to be able to set style prop |
From what I was able to tell, you can set a definite height, but only via the className property.
I have a scenario where the container that the chat box lives will change size dynamically (due to input area growing/shrinking below it and search area shrinking/growing above it). I am detecting the container size changes using the detect-element-resize library (https://github.com/sdecima/javascript-detect-element-resize), so it would be simplest to have a style prop that can be passed separate from the classname prop.
for example:
Or is there maybe already a way to do this without making any changes?
The text was updated successfully, but these errors were encountered: