Skip to content

bug: Cannot assign ref to IonNav #25652

Closed

Description

@sean-perkins

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

You are currently unable to assign a ref to the IonNav component.

e.g.:

const ref = useRef();

<IonNav ref={ref} />

Results in an error:

Property 'ref' does not exist on type 'IntrinsicAttributes & IonNav'

Expected Behavior

Developers should be able to assign a ref to IonNav to manually call methods available from the public API.

Steps to Reproduce

  1. Create a ref
  2. Assign the ref to IonNav
  3. Observe: Error

Code Reproduction URL

No response

Ionic Info

N/A

Additional Information

No response

Activity

  1. added
    package: react
    type: bug
    on Jul 18, 2022
  2. added a commit that references this issue on Jul 20, 2022
    041de9e
  3. sean-perkins commented on Aug 1, 2022

    @sean-perkins
    ContributorAuthor

    This issue has been resolved and will be available in the next patch release of Ionic (6.2.1).

  4. ionitron-bot commented on Aug 31, 2022

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  5. locked and limited conversation to collaborators on Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: reacttype: bug

    Type

    No type

    Fields

    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