Skip to content

Commit 776ac2c

Browse files
authored
fix: file upload preview state refresh when state changes (#2970)
1 parent d947ffa commit 776ac2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package/src/components/MessageInput/FileUploadPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const FileUploadPreviewWithContext = <
161161
})),
162162
);
163163
// eslint-disable-next-line react-hooks/exhaustive-deps
164-
}, [fileUploads.length]);
164+
}, [fileUploads]);
165165

166166
// Handler triggered when an audio is loaded in the message input. The initial state is defined for the audio here and the duration is set.
167167
const onLoad = (index: string, duration: number) => {

0 commit comments

Comments
 (0)