From ca7509a597d759d2a22ee1167f0f24c671b89ef5 Mon Sep 17 00:00:00 2001 From: TanyaGashtold <61136841+TanyaGashtold@users.noreply.github.com> Date: Thu, 16 Nov 2023 13:12:26 +0300 Subject: [PATCH] FIO-7112: fixed an issue where value component still shows calendar widget after the condition base component is changed to the component without widget (#5402) --- src/components/_classes/component/Component.js | 7 ++++++- src/components/textfield/TextField.js | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/_classes/component/Component.js b/src/components/_classes/component/Component.js index 05dfb83227..e03c56d624 100644 --- a/src/components/_classes/component/Component.js +++ b/src/components/_classes/component/Component.js @@ -211,7 +211,12 @@ export default class Component extends Element { return { operators: ['isEqual', 'isNotEqual', 'isEmpty', 'isNotEmpty'], valueComponent() { - return { type: 'textfield' }; + return { + type: 'textfield', + widget: { + type: 'input' + } + }; } }; } diff --git a/src/components/textfield/TextField.js b/src/components/textfield/TextField.js index 22f82c1f12..08871db25b 100644 --- a/src/components/textfield/TextField.js +++ b/src/components/textfield/TextField.js @@ -44,6 +44,12 @@ export default class TextFieldComponent extends Input { return { ...super.conditionOperatorsSettings, operators: [...super.conditionOperatorsSettings.operators, 'includes', 'notIncludes', 'endsWith', 'startsWith'], + valueComponent(classComp) { + return { + ...classComp, + type: 'textfield', + }; + } }; }