Skip to content

Commit

Permalink
message search check scroll edited
Browse files Browse the repository at this point in the history
  • Loading branch information
esracoskun committed Jun 27, 2022
1 parent 3a5586e commit 7a3f331
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MessageBox/MessageBox.tsx
Expand Up @@ -33,7 +33,7 @@ const MessageBox: React.FC<MessageBoxType> = ({ focus = false, notch = true, ...
const dateText = props.date && (props.dateString || format(props.date))

useEffect(() => {
if (prevProps.current !== focus && prevProps.current === true) {
if (prevProps.current !== focus && focus === true) {
if (messageRef) {
messageRef.current?.scrollIntoView({
block: 'center',
Expand Down

0 comments on commit 7a3f331

Please sign in to comment.