htmlstreamofficial / preline

Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
https://preline.co
Other
4.9k stars 309 forks source link

Property 'dropzone' is private and only accessible within class 'HSFileUpload'. #448

Closed ryanpantk closed 1 month ago

ryanpantk commented 3 months ago

Summary

Unable to access dropzone property to observe events in Nextjs Typescript Project

Steps to Reproduce

  1. Set up preline and HSFileUpload component according to stackblitz below
  2. Tried to add this part of the code in the documentation `const { element } = HSFileUpload.getInstance('#hs-file-upload', true); const { dropzone } = element;

dropzone.on('complete', () => { console.log('Item uploaded!'); });`

Demo Link

https://stackblitz.com/edit/preline-v2-nextjs-fmp5tr?file=src%2Fapp%2Fcomponents%2FPrelineScript.tsx

Expected Behavior

Console log "item uploaded!" when the file is uploaded

Actual Behavior

Error Property 'dropzone' is private and only accessible within class 'HSFileUpload'.

Screenshots

No response

olegpix commented 2 months ago

@ryanpantk Hi, Thanks for the heads up! We'll fix this in the next update.

jahaganiev commented 1 month ago

Hey @ryanpantk - please check out the latest version, the issue has been fixed. Thanks!