Skip to content

Commit 7a3f331

Browse files
committed
message search check scroll edited
1 parent 3a5586e commit 7a3f331

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/MessageBox/MessageBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const MessageBox: React.FC<MessageBoxType> = ({ focus = false, notch = true, ...
3333
const dateText = props.date && (props.dateString || format(props.date))
3434

3535
useEffect(() => {
36-
if (prevProps.current !== focus && prevProps.current === true) {
36+
if (prevProps.current !== focus && focus === true) {
3737
if (messageRef) {
3838
messageRef.current?.scrollIntoView({
3939
block: 'center',

0 commit comments

Comments
 (0)