From ddac6dedb1f2d9dce6015f7a1db410b14c451f71 Mon Sep 17 00:00:00 2001 From: Pawan Kumar Date: Thu, 23 May 2024 13:40:16 +0530 Subject: [PATCH] chore: add dependency map for WDSInputWidget (#33638) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #31805 /ok-to-test tags="@tag.Anvil" > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: af2713e5baa3268df6a0fbb8b4b501682ba5097f > Cypress dashboard url: Click here! Co-authored-by: Pawan Kumar --- .../config/propertyPaneConfig/contentConfig.ts | 2 +- .../src/widgets/wds/WDSInputWidget/widget/helper.ts | 10 ---------- .../src/widgets/wds/WDSInputWidget/widget/index.tsx | 6 ++++++ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/app/client/src/widgets/wds/WDSInputWidget/config/propertyPaneConfig/contentConfig.ts b/app/client/src/widgets/wds/WDSInputWidget/config/propertyPaneConfig/contentConfig.ts index e6636bc2bc..6131968e70 100644 --- a/app/client/src/widgets/wds/WDSInputWidget/config/propertyPaneConfig/contentConfig.ts +++ b/app/client/src/widgets/wds/WDSInputWidget/config/propertyPaneConfig/contentConfig.ts @@ -44,7 +44,7 @@ export const propertyPaneContentConfig = [ isBindProperty: false, isTriggerProperty: false, updateHook: inputTypeUpdateHook, - dependencies: ["dynamicHeight"], + dependencies: ["defaultText"], }, { helpText: diff --git a/app/client/src/widgets/wds/WDSInputWidget/widget/helper.ts b/app/client/src/widgets/wds/WDSInputWidget/widget/helper.ts index f16d55fbde..8de5ab0273 100644 --- a/app/client/src/widgets/wds/WDSInputWidget/widget/helper.ts +++ b/app/client/src/widgets/wds/WDSInputWidget/widget/helper.ts @@ -8,9 +8,7 @@ import { INPUT_INVALID_TYPE_ERROR, INPUT_TEXT_MAX_CHAR_ERROR, } from "@appsmith/constants/messages"; -import { InputTypes } from "components/constants"; import type { InputType } from "../component/types"; -import { DynamicHeight } from "utils/WidgetFeatures"; import type { WidgetProps } from "widgets/BaseWidget"; import { INPUT_TYPES } from "../constants"; @@ -142,14 +140,6 @@ export function inputTypeUpdateHook( }, ]; - if (propertyValue === InputTypes.MULTI_LINE_TEXT) { - if (props.dynamicHeight === DynamicHeight.FIXED) { - updates.push({ - propertyPath: "dynamicHeight", - propertyValue: DynamicHeight.AUTO_HEIGHT, - }); - } - } // if input type is email or password default the autofill state to be true // the user needs to explicity set autofill to fault disable autofill updates.push({ diff --git a/app/client/src/widgets/wds/WDSInputWidget/widget/index.tsx b/app/client/src/widgets/wds/WDSInputWidget/widget/index.tsx index c286e09a4a..9590ecc179 100644 --- a/app/client/src/widgets/wds/WDSInputWidget/widget/index.tsx +++ b/app/client/src/widgets/wds/WDSInputWidget/widget/index.tsx @@ -76,6 +76,12 @@ class WDSInputWidget extends WDSBaseInputWidget { return {}; } + static getDependencyMap(): Record { + return { + defaultText: ["inputType"], + }; + } + onFocusChange = (focusState: boolean) => { if (focusState) { this.props.updateWidgetMetaProperty("isFocused", focusState, {