Skip to content

[Bug] OneDrive 7.2 File Picker options.advanced.navigation.sourceTypes no longer correctly filters out other source types #1608

@jbyt1

Description

@jbyt1

Using options.advanced.navigation.sourceTypes no longer removes excluded types from the navigation bar.

Previously if I did not include "Recents" or "Sites" in the array the recents did not display and sites were not shown in the quick access navigation bar group.
Suddenly these have started appearing.
https://docs.microsoft.com/en-us/onedrive/developer/controls/file-pickers/js-v72/open-file
https://docs.microsoft.com/en-us/onedrive/developer/controls/file-pickers/js-v72/open-file?view=odsp-graph-online#customize-capabilities

Category

  • Question
  • Documentation issue
  • Bug

Expected or Desired Behavior

Providing options.advanced.navigation.sourceTypes should ONLY include these source types in the navigation bar.
I want to be able to display the file picker without SharePoint sites being displayed.

Observed Behavior

All source types are shown in the navigation bar despite not being added.
This seems to have changed in the last week or so.

With only "OneDrive" specified for source types I get this.
The styling also changed recently but I put that down to some cross over coming from the v8.0 update.

image

Steps to Reproduce

Assign a source type to the file picker options.
Confirm all source types are displayed in the navigation bar and not excluded.

var odOptions = {
  clientId: clientId,
  openInNewWindow: true,
  action: "query",
  viewType: "files",
  advanced: {
      navigation: {
          sourceTypes: "OneDrive"
      },
      accessToken: authToken,
      redirectUri: redirectUri
  },
  multiSelect: allowMultiSelect,
  success: function(files) { pickedFiles(callback, files) },
  cancel: function() { },
  error: function(error) { onError(error) }
}

OneDrive.open(odOptions);

Thank you.

[ ]: http://aka.ms/onedrive-api-issues
[x]: http://aka.ms/onedrive-api-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions