Skip to content

Gaps in React wrapper #116

@ad-m

Description

@ad-m

Two gaps in the wrapper at v0.2.0 that I had to work around:

  1. 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.

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions