react-google-drive-picker
Advanced tools
Comparing version 1.1.6 to 1.1.7
{ | ||
"name": "react-google-drive-picker", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "React google drive picker api", | ||
@@ -5,0 +5,0 @@ "types": "./dist", |
@@ -30,3 +30,3 @@ # React-google-drive-picker | ||
function App() { | ||
const [openPicker, data, authResponse] = useDrivePicker({onCancel: () => console.log("User closed picker with close/cancel button")}); | ||
const [openPicker, authResponse] = useDrivePicker(); | ||
// const customViewsArray = [new google.picker.DocsView()]; // custom view | ||
@@ -44,11 +44,11 @@ const handleOpenPicker = () => { | ||
// customViews: customViewsArray, // custom view | ||
callbackFunction: (data) => { | ||
if (data.action === 'cancel') { | ||
console.log('User clicked cancel/close button') | ||
} | ||
console.log(data) | ||
}, | ||
}) | ||
} | ||
useEffect(() => { | ||
// do anything with the selected/uploaded files | ||
if(data){ | ||
data.docs.map(i => console.log(i.name)) | ||
} | ||
}, [data]) | ||
@@ -73,2 +73,3 @@ | ||
|------------------|----------|------------------|-------------------------------| | ||
| callbackFunction |function | REQUIRED |Callback function that will be called on picker action | | ||
| clientId | string | REQUIRED | Google client id | | ||
@@ -75,0 +76,0 @@ | developerKey | string | REQUIRED | Google developer key | |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
112
12106
3
66