Client side Upload button disabling

one more question. In my form, i need "selectedCategory" to be selected. It is a useState which is either undefined or has a category value. Is there a way I can disable the upload button if that state variable is undefined (user must have category selected)? Thanks! I did this in core.ts if(selectedCategory === "") throw new UploadThingError("Need a category to be selected") But can i do this client-side too?
3 Replies
markr
markr7mo ago
I actually think that right now, we don't have a great way to disable the provided components on the clientside. You would either need to use the content customization options (https://docs.uploadthing.com/theming#content-customisation) or build your own custom component using our hooks.
Theming – uploadthing
Docs for the best file uploader to date
markr
markr7mo ago
Making a point to add this to our to do list, because there really should be a way to do this.
Ocean_dev
Ocean_devOP7mo ago
i agree. Thanks!
Want results from more Discord servers?
Add your server