Two gaps in the wrapper at v0.2.0 that I had to work around:
-
picker-error is not surfaced as an on… prop. The underlying <drive-picker> element does dispatch picker-error CustomEvents — they're just not in DrivePickerEventHandlers. To preserve the iframe-side authorization-error signal, I attach a manual picker-error listener via a container ref + querySelector("drive-picker"). Worth filing upstream — onError should be a first-class prop alongside onPicked / onCanceled / onOauthError.
-
visible is not a prop. The wrapper renders <drive-picker> but doesn't forward a ref or expose visibility. Per the element's README, visible must be set imperatively on the DOM node. The same effect that wires the picker-error listener also sets element.visible = true. The dialog closes by flipping our local pickerOpen state on any of onPicked / onCanceled / onOauthError / picker-error, which unmounts the wrapper.
Two gaps in the wrapper at v0.2.0 that I had to work around:
picker-erroris not surfaced as anon…prop. The underlying<drive-picker>element does dispatchpicker-errorCustomEvents — they're just not inDrivePickerEventHandlers. To preserve the iframe-side authorization-error signal, I attach a manualpicker-errorlistener via a container ref +querySelector("drive-picker"). Worth filing upstream —onErrorshould be a first-class prop alongsideonPicked/onCanceled/onOauthError.visibleis not a prop. The wrapper renders<drive-picker>but doesn't forward a ref or expose visibility. Per the element's README,visiblemust be set imperatively on the DOM node. The same effect that wires thepicker-errorlistener also setselement.visible = true. The dialog closes by flipping our localpickerOpenstate on any ofonPicked/onCanceled/onOauthError/picker-error, which unmounts the wrapper.