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 { .content {
display: flex;
flex-flow: column nowrap; flex-flow: column nowrap;
flex: 1; flex: 1;
padding: 0 15px; padding: 0 15px;
margin-bottom: 0; margin-bottom: 0;
overflow-y: auto;
.chat-window { .chat-window {
display: flex; display: flex;
overflow-y: auto; // margin-bottom: 5px;
margin-bottom: 5px;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;

View File

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