Demo (Documentation)
var ContentPicker = require('./ContentPicker').default;
<IntlProvider locale="en" textComponent={React.Fragment}>
<ContentPicker
features={FEATURES}
rootFolderId={FOLDER_ID}
token={TOKEN}
/>
</IntlProvider>
Prop | Type | Default | Description |
---|---|---|---|
token* | string | See the developer docs. | |
autoFocus | boolean | See the developer docs. | |
cancelButtonLabel | string | See the developer docs. | |
canCreateNewFolder | boolean | true |
See the developer docs. |
canSetShareAccess | boolean | true |
See the developer docs. |
canUpload | boolean | true |
See the developer docs. |
chooseButtonLabel | string | See the developer docs. | |
currentFolderId | string | The current folder shown for the content picker. This should be a sub folder to the root folder. | |
defaultView | string | files |
See the developer docs. |
extensions | Array<string> | [] |
See the developer docs. |
initialPage | number | 1 | See the developer docs. |
initialPageSize | number | 50 | See the developer docs. |
isTouch | boolean | See the developer docs. | |
language | string | See the Internationalization section | |
logoUrl | string | See the developer docs. | |
maxSelectable | number | Infinity |
See the developer docs. |
messages | Map<string, string> | See the Internationalization section | |
onCancel | function | Callback function for when the cancel button is pressed. | |
onChoose | function | Callback function for when the choose button is pressed. | |
requestInterceptor | function | See the developer docs. | |
responseInterceptor | function | See the developer docs. | |
rootFolderId | string | 0 |
The root folder for the content picker. |
sharedLink | string | See the developer docs. | |
sharedLinkPassword | string | See the developer docs. | |
sortBy | string | name |
See the developer docs. |
sortDirection | string | asc |
See the developer docs. |
type | string | file, web_link |
Indicates which type of items can be picked. Should be a comma seperated combination of file , folder or web_link . |
See the developer docs.