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: add showOpenFilePicker method #510

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

linxianxi
Copy link
Contributor

见到挺多人有这样的需求的,比较方便 ant-design/ant-design#41902

showOpenFilePicker 是因为 window 下的方法也叫这个

like https://github.com/react-dropzone/react-dropzone#using-open-on-click

@vercel
Copy link

vercel bot commented Jun 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
upload ❌ Failed (Inspect) Jun 2, 2023 7:47am

@linxianxi
Copy link
Contributor Author

@afc163 这个 pr 看下

@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #510 (6ec19d2) into master (0d0ca2f) will decrease coverage by 0.94%.
The diff coverage is 25.00%.

❗ Current head 6ec19d2 differs from pull request most recent head dc73c0e. Consider uploading reports for the commit dc73c0e to get more accurate results

@@            Coverage Diff             @@
##           master     #510      +/-   ##
==========================================
- Coverage   84.92%   83.98%   -0.94%     
==========================================
  Files           6        6              
  Lines         252      256       +4     
  Branches       63       63              
==========================================
+ Hits          214      215       +1     
- Misses         38       41       +3     
Impacted Files Coverage Δ
src/Upload.tsx 60.00% <0.00%> (-15.00%) ⬇️
src/AjaxUploader.tsx 81.95% <50.00%> (-0.49%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@afc163
Copy link
Member

afc163 commented Jun 7, 2023

这个方法不通过 click 行为是调不通的,会引发咨询。

我们不应该提供方法,应该始终让用户手动触发。或者提供原生 input 的获取方式。

@afc163 afc163 closed this Jun 7, 2023
@afc163 afc163 reopened this Jun 7, 2023
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.

2 participants