Skip to content

Conversation

J-Michalek
Copy link
Collaborator

πŸ”— Linked issue

Resolves: #4852

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

I've omitted the update:modelValue event from the FileUploadEmits interface used in defineEmits as the type seems to break when used in both defineModel and defineEmits at the same time.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

J-Michalek and others added 5 commits August 6, 2025 19:25
The accept prop did not work with image/* etc.
The accept prop did not work with image/* etc.
Seems like the defineModel and the FileUploadEmits
interface had some kind of a conflict when resolving.
@github-actions github-actions bot added the v3 #1289 label Aug 31, 2025
Copy link

pkg-pr-new bot commented Aug 31, 2025

npm i https://pkg.pr.new/@nuxt/ui@4853

commit: 2c43cd7

Copy link
Member

@benjamincanac benjamincanac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it would be easier to just remove it from the FileUploadEmits interface, what do you think?

Also, I noticed we have the same error in the Slider component and maybe others πŸ€”

@J-Michalek
Copy link
Collaborator Author

@benjamincanac Yeah I also saw it in more components, but I did not try if it works there... I also saw it used together with useVModel and though it might work alright with it, I would just remove it from the interface and let defineModel macro take care of it, but I am not sure if someone actually needs to be able to have the v-model events defined in the interface.

Copy link
Member

I would only remove it when used with defineModel, not useVModel (which is used in some components to handle defaultValue). It was mostly used for the Emits section in the docs but it's picking up the one from defineModel correctly now.

@J-Michalek
Copy link
Collaborator Author

Sure, I will take care of it.

@benjamincanac benjamincanac changed the title fix(FileUpload): broken types for update:modelValue event fix(components): broken types for update:modelValue event Sep 1, 2025
@benjamincanac benjamincanac changed the title fix(components): broken types for update:modelValue event fix(components): broken types for update:model-value event Sep 1, 2025
@benjamincanac
Copy link
Member

@J-Michalek I took the liberty to push to your PR and rename at the same time some events for consistency, let me know what you think!

@J-Michalek
Copy link
Collaborator Author

LGTM!

@benjamincanac benjamincanac merged commit 7133f50 into nuxt:v3 Sep 1, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 #1289
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type mismatch: UFileUpload @update:model-value emits unknown instead of documented type
2 participants