mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
chore: Unleash AI chat UX bug fixes (#8488)
https://linear.app/unleash/issue/2-2859/small-ux-bug-fixes-on-the-unleash-ai-chat Bug fixes: - Up and down arrow keys not functioning in multiline input - Multiline input expanding beyond the intended size limit - Chat window failing to properly scroll to the bottom when opened
This commit is contained in:
parent
0a815e734a
commit
0f3e7ec7e3
@ -107,7 +107,9 @@ export const AIChat = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
scrollToEnd();
|
||||
requestAnimationFrame(() => {
|
||||
scrollToEnd();
|
||||
});
|
||||
|
||||
const intersectionObserver = new IntersectionObserver(
|
||||
([entry]) => {
|
||||
|
@ -81,10 +81,11 @@ export const AIChatInput = ({
|
||||
placeholder='Type your message here'
|
||||
fullWidth
|
||||
multiline
|
||||
maxRows={20}
|
||||
maxRows={5}
|
||||
value={message}
|
||||
onChange={(e) => setMessage(e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
e.stopPropagation();
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
send();
|
||||
|
Loading…
Reference in New Issue
Block a user