Skip to content

Commit 0714aa1

Browse files
fix(precognition): correctly set file data for avatar (#10840)
* fix: set first file as avatar * Update example --------- Co-authored-by: Tim MacDonald <[email protected]>
1 parent 6fcb3d2 commit 0714aa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

precognition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ If you are validating a subset of a form's inputs with Precognition, it can be u
330330
id="avatar"
331331
type="file"
332332
onChange={(e) => {
333-
form.setData('avatar', e.target.value);
333+
form.setData('avatar', e.target.files[0);
334334

335335
form.forgetError('avatar');
336336
}}

0 commit comments

Comments
 (0)