diff --git a/CHANGELOG.JSON b/CHANGELOG.JSON index 0f77bcb5d..7fd7f3950 100644 --- a/CHANGELOG.JSON +++ b/CHANGELOG.JSON @@ -12,7 +12,8 @@ "`FilePicker` - French translation [#449](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/449)", "Slovak localization [#457](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/457)", "`TaxonomyPicker`: Placeholder for Taxonomy Picker [#464](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/464)", - "`ListItemPicker`, `PeoplePicker`: Placeholder for `ListItemPicker` and `PeoplePicker` [#486](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/486)" + "`ListItemPicker`, `PeoplePicker`: Placeholder for `ListItemPicker` and `PeoplePicker` [#486](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/486)", + "`FilePicker`: Do not store active tab in url's hash [#488](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/488)" ], "fixes": [ "`RichText`: problem with edit mode [#445](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/445)", diff --git a/docs/documentation/docs/controls/FilePicker.md b/docs/documentation/docs/controls/FilePicker.md index eeff97ccb..949b27039 100644 --- a/docs/documentation/docs/controls/FilePicker.md +++ b/docs/documentation/docs/controls/FilePicker.md @@ -74,6 +74,7 @@ The FilePicker component can be configured with the following properties: | hideSiteFilesTab | boolean | no | Specifies if SiteFilesTab should be hidden. | | hideLocalUploadTab | boolean | no | Specifies if LocalUploadTab should be hidden. | | hideLinkUploadTab | boolean | no | Specifies if LinkUploadTab should be hidden. | +| storeLastActiveTab | boolean | no | 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` | interface `IFilePickerResult` diff --git a/src/controls/filePicker/FilePicker.tsx b/src/controls/filePicker/FilePicker.tsx index 75108c3dd..3d43026e6 100644 --- a/src/controls/filePicker/FilePicker.tsx +++ b/src/controls/filePicker/FilePicker.tsx @@ -221,12 +221,13 @@ export class FilePicker extends React.Component { + const addUrl = this.props.storeLastActiveTab !== false; let links = []; if (!this.props.hideRecentTab) { links.push({ name: strings.RecentLinkLabel, - url: '#recent', + url: addUrl ? '#recent' : undefined, icon: 'Recent', key: 'keyRecent', }); @@ -234,7 +235,7 @@ export class FilePicker extends React.Component + showtooltip={true} + defaultSelectedUsers={['aleksei.dovzhyk@sharepointalist.com']} />