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

FilePicker - "onChange" event does not exist despite being documented #747

Closed
nbelyh opened this issue Nov 27, 2020 · 3 comments
Closed
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Milestone

Comments

@nbelyh
Copy link
Contributor

nbelyh commented Nov 27, 2020

Category

[ ] Enhancement

[ ] Bug

[x] Question

Version

Please specify what version of the library you are using: [2.1.0]

Question

There is "onChange" even mentioned in the documentation:
https://pnp.github.io/sp-dev-fx-controls-react/controls/FilePicker/

Property Type Required Description
onChange (filePickerResult: IFilePickerResult) => void no Handler when the file selection has been changed.

Actually, this event does not seem to exist in the control. The one that does exist is called onChanged (notice 'd' at the end). But this one (with 'd') is never fired, it is only declared in the interface (but never triggered). You can verify that by simply trying full-text-search - the interface is the only place where it appears to exist in the FilePicker control. Practically, it is never called either.

Probably this event should be simply removed?

@ghost
Copy link

ghost commented Nov 27, 2020

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Nov 27, 2020
AJIXuMuK added a commit that referenced this issue Nov 28, 2020
@AJIXuMuK
Copy link
Collaborator

Hi @nbelyh!
Thank you for reporting this one!

The fix has been implemented. Now onChange (without d) is called when the file is selected on Upload tab.

@AJIXuMuK AJIXuMuK added status:fixed-next-drop Issue will be fixed in upcoming release. type:bug and removed Needs: Triage 🔍 labels Nov 28, 2020
@AJIXuMuK AJIXuMuK added this to the 2.2.0 milestone Nov 28, 2020
@nbelyh
Copy link
Contributor Author

nbelyh commented Nov 28, 2020

@AJIXuMuK Thanks 👍 - works great. Still wondering though what could be the purpose of this event 😄

@nbelyh nbelyh closed this as completed Nov 29, 2020
@estruyf estruyf mentioned this issue Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Projects
None yet
Development

No branches or pull requests

2 participants