Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: #3839

Open
MajeedGodhrawala opened this issue Sep 25, 2024 · 0 comments
Open

bug: #3839

MajeedGodhrawala opened this issue Sep 25, 2024 · 0 comments
Labels
triage New issues

Comments

@MajeedGodhrawala
Copy link

MajeedGodhrawala commented Sep 25, 2024

Describe the Bug

When using the component in combination with an , a warning is triggered indicating that extraneous non-props attributes (specifically registerIonPage) are being passed to the component. This occurs because the component renders fragment or text root nodes, preventing automatic inheritance of these attributes.

Expected Behavior

The should properly inherit any non-props attributes passed to it without triggering warnings. This should allow the application to run without console warnings while maintaining the intended functionality of the menu component.

Steps to Reproduce

  1. Create a New Vue Component:

Start by creating a new Vue component that includes the following code:

image

  1. Run the Application:
  • Start the application and navigate to the component you just created.
  1. Observe the Warning:
  • You will see the following warning in the console:
    Extraneous non-props attributes (registerIonPage) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.

Solution :

  • To resolve this issue, modify the component structure as follows:
  1. Move <ion-menu> Inside <ion-page> :
  • Place the <ion-menu> inside the <ion-page> instead of having it at the root level.
  1. Update <ion-content> ID:
  • Add the id="main-content" attribute to the <ion-content> element instead of the <ion-page>

Updated Solution Code:

image

Note:

The documentation regarding this structure seems incorrect, but the solution above successfully eliminates the warning while maintaining the functionality of the menu.

Screenshots

**Code With Problem : **

image

**Solution Code : **

image

Operating System

Windows

Browser

Chrome

Version

129.0.6668.70

Additional Information

The documentation regarding this structure seems incorrect, but the solution above successfully eliminates the warning while maintaining the functionality of the menu.

@MajeedGodhrawala MajeedGodhrawala added the triage New issues label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New issues
Projects
None yet
Development

No branches or pull requests

1 participant