fix: Unable to scroll until multiple comments (#7112)
* fix: Unable to scroll in comments fix: Missing highlighted text on first comment while composing * docs
This commit is contained in:
@@ -24,6 +24,7 @@ import useOnClickOutside from "~/hooks/useOnClickOutside";
|
||||
import useStores from "~/hooks/useStores";
|
||||
import CommentEditor from "./CommentEditor";
|
||||
import { Bubble } from "./CommentThreadItem";
|
||||
import { HighlightedText } from "./HighlightText";
|
||||
|
||||
type Props = {
|
||||
/** Callback when the draft should be saved. */
|
||||
@@ -42,6 +43,8 @@ type Props = {
|
||||
standalone?: boolean;
|
||||
/** Whether to animate the comment form in and out */
|
||||
animatePresence?: boolean;
|
||||
/** Text to highlight at the top of the comment */
|
||||
highlightedText?: string;
|
||||
/** The text direction of the editor */
|
||||
dir?: "rtl" | "ltr";
|
||||
/** Callback when the user is typing in the editor */
|
||||
@@ -64,6 +67,7 @@ function CommentForm({
|
||||
standalone,
|
||||
placeholder,
|
||||
animatePresence,
|
||||
highlightedText,
|
||||
dir,
|
||||
...rest
|
||||
}: Props) {
|
||||
@@ -274,6 +278,9 @@ function CommentForm({
|
||||
$firstOfThread={standalone}
|
||||
column
|
||||
>
|
||||
{highlightedText && (
|
||||
<HighlightedText>{highlightedText}</HighlightedText>
|
||||
)}
|
||||
<CommentEditor
|
||||
key={`${forceRender}`}
|
||||
ref={editorRef}
|
||||
|
||||
Reference in New Issue
Block a user