ionic-team / ionic-docs

https://ionicframework.com/docs
Apache License 2.0
589 stars 3.04k forks source link

bug: #3839

Open MajeedGodhrawala opened 2 months ago

MajeedGodhrawala commented 2 months ago

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:
  1. Observe the Warning:

Solution :

  1. Move <ion-menu> Inside <ion-page> :
  1. Update <ion-content> ID:

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.