Closed Hyffer closed 2 years ago
@Hyffer <MainContainer /> has the following styles by default:
position: relative;
height: 100%;
These styles come from the cs-main-container CSS class.
So, you have two possibilities:
You can also inspect HTML code in the Chatscope chat demo app to see how it's done.
Thanks a lot. I refer to the chat demo:
return <div style={{
height: "100%",
weight: "100%"
position: "absolute"
}}>
<MainContainer responsive>
...
</MainContainer>
</div>;
And that solves my problem.
Best way would be to use height: "100vh"
. That works for me, but then the children overflow anyway without scrollbar when there are many messages in the MessageList
. I think the issue is that MessageList
injects another wrapper div between itself and the messages underneath without a max-width: "inherit"
css attribute.
I noticed there was a flex layout in horizontal direction. But after going through the storybook, I was still unable to find how to make it align with its parent container in vertical direction.
(The code on storybook is something like above. The height property is set to fixed 600px in this case.) Or I need to implement it myself outside of the ui kit?