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 keeps the URL's hash dirty #488

Closed
shaipetel opened this issue Feb 24, 2020 · 5 comments
Closed

FilePicker keeps the URL's hash dirty #488

shaipetel opened this issue Feb 24, 2020 · 5 comments
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:enhancement New feature or enhancement of existing capability
Milestone

Comments

@shaipetel
Copy link

Category

[x] Enhancement

[x] Bug

[ ] Question

Version

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

Expected / Desired Behavior / Question

When using the file picker and switching to different content providers - the control changes the hash in the page's URL.
When a file is selected and the picker is closed - I would expect the hash to return to empty or what it was before, so it won't break other control's functionality.

Either make the hash empty when the control is done, or bring back what was there before. Best yet - don't change the hash at all! (this this is a picker and not a control that is always open, IMHO it shouldn't change the hash of the entire page at all...)

Observed Behavior

After the picker was used, the hash will stay "#onedrive" or "#globe"

Steps to Reproduce

Use the picker and select a different content category, select a file and close the picker.

@ghost
Copy link

ghost commented Feb 24, 2020

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

@AJIXuMuK
Copy link
Collaborator

AJIXuMuK commented Mar 1, 2020

Hi @shaipetel,

I have added new property to FilePicker props:

/**
   * Specifies if last active tab will be stored after the Upload panel has been closed.
   * Note: the value of selected tab is stored in the queryString hash.
   * @default true
   */
  storeLastActiveTab?: boolean;

If you set it to false the hash will not be modified.
By default the behavior remains as is.

You can test it in beta version and it will be available in the next drop.

@AJIXuMuK AJIXuMuK added status:fixed-next-drop Issue will be fixed in upcoming release. type:enhancement New feature or enhancement of existing capability and removed Needs: Triage 🔍 labels Mar 1, 2020
@AJIXuMuK AJIXuMuK added this to the 1.17.0 milestone Mar 1, 2020
@shaipetel
Copy link
Author

Perfect. Thanks!

@shaipetel
Copy link
Author

So, I just got 1.17.0 installed and the property storeLastActiveTab does not exist on the file picker.

What am I doing wrong?

@shaipetel shaipetel reopened this Mar 25, 2020
@shaipetel
Copy link
Author

Spoke too soon. Took a few minutes and a rebuild and now it shows up and works. thanks!

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:enhancement New feature or enhancement of existing capability
Projects
None yet
Development

No branches or pull requests

2 participants