BayBreezy / ui-thing

A set of components created with Radix-Vue. Inspired by shadcn/ui & shadcn-vue.
https://ui-thing.behonbaker.com
Other
298 stars 21 forks source link

fix: dead loop caused by dropfile's change event #5

Closed mirari closed 7 months ago

mirari commented 7 months ago

Using Dropfile and selecting any file will result in an infinite loop:

  <UiDropfile @dropped="uploadFiles" />

The reason is that the execution of the reset method provided in the useFileDialog also triggers the onChange event.

onChange((files: FileList) => {
    handleDrop(Array.from(files || []))
    reset()
})
netlify[bot] commented 7 months ago

Deploy Preview for zesty-gnome-29d7ea ready!

Name Link
Latest commit 9c4d13545b408aa5523bd7fe068a265cfc59cfab
Latest deploy log https://app.netlify.com/sites/zesty-gnome-29d7ea/deploys/65f178e9a23df6000910133b
Deploy Preview https://deploy-preview-5--zesty-gnome-29d7ea.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

BayBreezy commented 7 months ago

Thank you @mirari . I just did some other changes on your branch while I was here lol