Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(file-uploader): move files + add required prop + allow to clear from parent #1314

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

WaDadidou
Copy link
Collaborator

@WaDadidou WaDadidou commented Oct 18, 2024

The real purpose of this PR

Better arborescence

image

Make <Label isRequired works

I've just added a required prop to FileUploader. We consider FileUploader as an "input". It has a Label and it is used in forms

image


BONUS

Allow to clear the input type='file' in FileUploaderSmall from a parent using a ref

Not used yet, but used in Launchpad PR (#1024).
We can remove that from this atomic PR if you want

image
image

Usage

image

The point with that is that we can clear the file visually, that's ok (React state). BUT the file is still in the input type='file'.
So I've added this resetFiles cleaner.

Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for testitori ready!

Name Link
🔨 Latest commit f166093
🔍 Latest deploy log https://app.netlify.com/sites/testitori/deploys/671eec9de7670b0008ba7074
😎 Deploy Preview https://deploy-preview-1314--testitori.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.

Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for teritori-dapp ready!

Name Link
🔨 Latest commit f166093
🔍 Latest deploy log https://app.netlify.com/sites/teritori-dapp/deploys/671eec9d57d0bb00081803d5
😎 Deploy Preview https://deploy-preview-1314--teritori-dapp.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.

Copy link
Collaborator

@MikaelVallenet MikaelVallenet left a comment

Choose a reason for hiding this comment

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

LGTM

@WaDadidou WaDadidou self-assigned this Oct 18, 2024
@n0izn0iz n0izn0iz changed the title Fix: arrange fileUploader arborescence, add small features feat(file-uploader): move files + add required prop + allow to clear from parent Oct 28, 2024
@n0izn0iz n0izn0iz merged commit e7d12b0 into main Oct 28, 2024
21 of 22 checks passed
@n0izn0iz n0izn0iz deleted the fix-enhance-file-uploader branch October 28, 2024 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants