From 07dee747145c8c5f7f070812cf6df1674ba50f24 Mon Sep 17 00:00:00 2001 From: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com> Date: Wed, 9 Aug 2023 09:14:54 -0500 Subject: [PATCH] refactor(datetime): remove unused isPresented variable (#27956) Issue number: N/A --------- ## What is the current behavior? `ion-datetime` has a state variable `isPresented`, which is never set and goes unused except to add a CSS class (also unused). ## What is the new behavior? State variable and class removed. ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information --- core/src/components/datetime/datetime.tsx | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 8afefa45ac6..b2f4e30d785 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -138,7 +138,6 @@ export class Datetime implements ComponentInterface { @Element() el!: HTMLIonDatetimeElement; - @State() isPresented = false; @State() isTimePopoverOpen = false; /** @@ -2361,19 +2360,7 @@ export class Datetime implements ComponentInterface { } render() { - const { - name, - value, - disabled, - el, - color, - isPresented, - readonly, - showMonthAndYear, - preferWheel, - presentation, - size, - } = this; + const { name, value, disabled, el, color, readonly, showMonthAndYear, preferWheel, presentation, size } = this; const mode = getIonMode(this); const isMonthAndYearPresentation = presentation === 'year' || presentation === 'month' || presentation === 'month-year'; @@ -2393,7 +2380,6 @@ export class Datetime implements ComponentInterface { class={{ ...createColorClasses(color, { [mode]: true, - ['datetime-presented']: isPresented, ['datetime-readonly']: readonly, ['datetime-disabled']: disabled, 'show-month-and-year': shouldShowMonthAndYear,