Skip to content

Sheet modal doesn't forward refs to Component (and other components) #258

@SevereOverfl0w

Description

@SevereOverfl0w

Check that this is really a bug

  • I confirm

Reproduction link

obvious, see below

Bug description

When doing:

<Sheet ref={myRef}> ... </Sheet>

The ref is entirely discarded. It looks like at some point this was closer to correct because of useImperativeHandle forwarding the ref. Although the use of .el inside there was a bit unconventional.

useImperativeHandle was removed in July. Meaning ref is now inert.

I think the correct behaviour would be to pass ref directly to <Component> in components.

Expected Behavior

My ref is set when passing to Konsta UI components as the ref prop.

Actual Behavior

ref is always unset.

Konsta UI version

5.0.2

Platform/Target and Browser Versions

Android

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Konsta UI issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    ReactIssue with Tailwind Mobile React

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions