Skip to content

Commit 06cf965

Browse files
committed
fix: file upload preview state refresh when state changes
1 parent f8e37f3 commit 06cf965

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)