fix issue where scrollbar alway shows regardless of the height

This commit is contained in:
Red Adaya 2024-04-29 13:59:18 +08:00
parent e40f93b858
commit ba5a089382
2 changed files with 4 additions and 3 deletions

View File

@ -25,16 +25,15 @@
}
.content {
display: flex;
flex-flow: column nowrap;
flex: 1;
padding: 0 15px;
margin-bottom: 0;
overflow-y: auto;
.chat-window {
display: flex;
overflow-y: auto;
margin-bottom: 5px;
// margin-bottom: 5px;
flex-direction: column;
height: 100%;

View File

@ -251,12 +251,14 @@ class AIChat extends React.Component<{}, {}> {
</div>
<OverlayScrollbarsComponent className="content" options={{ scrollbars: { autoHide: "leave" } }}>
{/* <div className="content"> */}
<div className="chat-window" ref={this.chatWindowScrollRef}>
<div className="filler"></div>
<For each="chitem" index="idx" of={chatMessageItems}>
{this.renderChatMessage(chitem)}
</For>
</div>
{/* </div> */}
</OverlayScrollbarsComponent>
<div className="chat-input">