提交和取消按钮在反应谷歌选择器中不起作用

问题描述 投票:0回答:1

提交、取消、关闭按钮在 React google picker 中不起作用,但可以通过双击文件来选择文件

import GooglePicker from "react-google-picker";

<GooglePicker
  clientId={"**********"}
  developerKey={"*********"}
  scope={["https://www.googleapis.com/auth/drive.file"]}
  onChange={(data) => googleDriveFilePicked(data)}
  onAuthenticate={(token) => { setToken(token) }}
  onAuthFailed={(data) => console.log("on auth failed:", data)}
  multiselect={false}
  navHidden={false}
  authImmediate={false}
  mimeTypes={["application/pdf", "application/vnd.google-apps.folder"]}
  viewId={"DOCS"}
>
  <Button className="drive-logo-section" <img alt="Google" src={Google} />
  </Button>
</GooglePicker>

git链接:https://github.com/sdoomz/react-google-picker/issues/38

reactjs google-drive-api google-picker
1个回答
0
投票

我写的一篇博客文章介绍了如何将 Google Picker 添加到 React:https://medium.com/@mohammedshameemke/google-picker-api-integration-to-reactjs-mui-typescript-6c7461aa4598

© www.soinside.com 2019 - 2024. All rights reserved.