Skip to content

Commit 14557d5

Browse files
committed
Added additional props for File Picker
1 parent 5faa158 commit 14557d5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/controls/filePicker/FilePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class FilePicker extends React.Component<IFilePickerProps, IFilePickerSta
4646
this.fileSearchService = new FilesSearchService(props.context, this.props.bingAPIKey);
4747

4848
this.state = {
49-
panelOpen: false,
49+
panelOpen: this.props.isPanelOpen || false,
5050
organisationAssetsEnabled: false,
5151
showFullNav: true
5252
};

src/controls/filePicker/IFilePickerProps.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,12 @@ export interface IFilePickerProps {
113113
* @default true
114114
*/
115115
storeLastActiveTab?: boolean;
116+
/**
117+
* Specifies if the file picker panel is open by default or not
118+
*/
119+
isPanelOpen?: boolean;
120+
/**
121+
* Handler when file picker has been cancelled.
122+
*/
123+
onCancel?: () => void;
116124
}

0 commit comments

Comments
 (0)