Skip to content

fix(refresher): mode property can be used in typescript - #28717

Merged
liamdebeasi merged 1 commit into
mainfrom
FW-5785
Dec 18, 2023
Merged

fix(refresher): mode property can be used in typescript#28717
liamdebeasi merged 1 commit into
mainfrom
FW-5785

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Dec 18, 2023

Copy link
Copy Markdown
Contributor

Issue number: resolves #28716


What is the current behavior?

All components that have per-mode stylesheets can have their mode adjusted by setting mode on the component. We use the setMode function to determine which mode to use on the component:

setMode((elm: any) => {

While this works on refresher, it is missing the virtualProp jsdoc comment which causes it to not have the appropriate type information. As a result, when developers try to use a JS binding for mode, they will get compilation errors.

What is the new behavior?

  • Adds virtualProp for mode to refresher

Does this introduce a breaking change?

  • Yes
  • No

Other information

I am considering this a bug fix instead of a feature. In non-TypeScript environments you can set mode on ion-refresher and it does change the mode. What's missing here is the type information associated with it.

Dev build: 7.6.2-dev.11702914017.1ae72da5

@github-actions github-actions Bot added package: core @ionic/core package package: angular @ionic/angular package labels Dec 18, 2023
@liamdebeasi liamdebeasi changed the title Fw 5785 fix(refresher): mode property can be used in typescript Dec 18, 2023
@DwieDima

Copy link
Copy Markdown
Contributor

wow that was fast! 🚀
could you release the fix on both, ionic 6 and 7?

@liamdebeasi

Copy link
Copy Markdown
Contributor Author

This will only be an Ionic 7 fix. We only back port fixes to Ionic 6 for those who have an "Extended Support" plan with Ionic: https://ionicframework.com/docs/reference/support#framework-maintenance-and-support-status

@liamdebeasi
liamdebeasi marked this pull request as ready for review December 18, 2023 15:56
@liamdebeasi
liamdebeasi requested review from a team, sean-perkins and thetaPC as code owners December 18, 2023 15:56

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, works as expected

@liamdebeasi
liamdebeasi added this pull request to the merge queue Dec 18, 2023
Merged via the queue into main with commit 7ce1031 Dec 18, 2023
@liamdebeasi
liamdebeasi deleted the FW-5785 branch December 18, 2023 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(refresher): Can't bind to 'mode' since it isn't a known property of 'ion-refresher'

3 participants