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
fix(global): Only cascade mode from parent *Ionic* components #20828
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested using dev build 5.1.0-dev.202003251635.54463b4
This is the expected behavior, with this PR:
Warning on foo
, falls back to default mode:
<ion-toggle mode="ios"></ion-toggle>
<ion-toggle mode="md"></ion-toggle>
<ion-toggle mode="foo"></ion-toggle>
No warning, falls back to default mode:
<p mode="ios">
<ion-toggle></ion-toggle>
</p>
<p mode="md">
<ion-toggle></ion-toggle>
</p>
<p mode="foo">
<ion-toggle></ion-toggle>
</p>
Warning on foo
, falls back to default mode:
<ion-segment mode="ios">
<ion-segment-button>Button</ion-segment-button>
<ion-segment-button>Button</ion-segment-button>
</ion-segment>
<ion-segment mode="md">
<ion-segment-button>Button</ion-segment-button>
<ion-segment-button>Button</ion-segment-button>
</ion-segment>
<ion-segment mode="foo">
<ion-segment-button>Button</ion-segment-button>
<ion-segment-button>Button</ion-segment-button>
</ion-segment>
Thank you for this! Awesome change.
Great! The final changes looks great 👍 |
This will be in the |
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: Fixes #20055
Wrapping an Ionic component in a non-Ionic element with a
mode
attribute throws error:What is the new behavior?
Only apply the Ionic mode from Ionic ancestors.
Does this introduce a breaking change?
Other information