Skip to content

Commit

Permalink
FilePicker Issue - Site Tab - Many Document Libraries No Scrolling
Browse files Browse the repository at this point in the history
FilePicker Control - Site Tab - When many document libraries exists, the screen will not scroll and thereby all libraries are not available - same issue as in the property controls (pnp/sp-dev-fx-property-controls#525)
  • Loading branch information
krainer committed Jan 4, 2023
1 parent 450b664 commit ee5adb2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/controls/filePicker/SiteFilePickerTab/SiteFilePickerTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ISiteFilePickerTabState } from './ISiteFilePickerTabState';
import { DocumentLibraryBrowser } from '../controls/DocumentLibraryBrowser/DocumentLibraryBrowser';
import { FileBrowser } from '../controls/FileBrowser/FileBrowser';
import { PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/components/Button';
import { ScrollablePane } from 'office-ui-fabric-react/lib/ScrollablePane';
import { Breadcrumb } from 'office-ui-fabric-react/lib/Breadcrumb';
import { IFile, IFolder, ILibrary } from '../../../services/FileBrowserService.types';
import { IFilePickerResult, FilePickerBreadcrumbItem } from '../FilePicker.types';
Expand Down Expand Up @@ -177,10 +178,14 @@ export default class SiteFilePickerTab extends React.Component<ISiteFilePickerTa
</div>
<div className={styles.tabFiles}>
{this.state.libraryAbsolutePath === undefined &&
<DocumentLibraryBrowser
fileBrowserService={this.props.fileBrowserService}
includePageLibraries={this.props.includePageLibraries}
onOpenLibrary={(selectedLibrary: ILibrary) => this._handleOpenLibrary(selectedLibrary, true)} />}
<div className={styles.scrollablePaneWrapper}>
<ScrollablePane>
<DocumentLibraryBrowser
fileBrowserService={this.props.fileBrowserService}
includePageLibraries={this.props.includePageLibraries}
onOpenLibrary={(selectedLibrary: ILibrary) => this._handleOpenLibrary(selectedLibrary, true)} />
</ScrollablePane>
</div>}
{this.state.libraryAbsolutePath !== undefined &&
<FileBrowser
onChange={(filePickerResults: IFilePickerResult[]) => this._handleSelectionChange(filePickerResults)}
Expand Down

0 comments on commit ee5adb2

Please sign in to comment.