Skip to content
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

“1条新消息” #143

Open
Leemenmen opened this issue May 27, 2024 · 0 comments
Open

“1条新消息” #143

Leemenmen opened this issue May 27, 2024 · 0 comments

Comments

@Leemenmen
Copy link

const initialMessages = [
        {
            type: 'text',
            content: {text: '你好,我是智能问答助手,请开始向我提问吧~~'},
            user: {avatar: aiAvatar},
        },
    ];

const {messages, appendMsg, setTyping, resetList, updateMsg} = useMessages(initialMessages);

return   <Chat
                    placeholder={inputText}
                    messages={messages}
                />

当使用 resetList重置问答记录时,当问答记录长度超过界面中能显示的条目数时,问答区域会显示“1条新消息”,如图1,点击该显示,界面才会下拉到最下面的问答条目中,如图2。

1

图1

2

图2

如何配置,使resetList更新问答区域时,当问答记录长度超过界面中能显示的条目数时,直接定位到最下面的问答条目,即图2。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant