From 722bfebfe08dcefdedc4324e1363bee009331941 Mon Sep 17 00:00:00 2001 From: Tameem Bin Haider Date: Wed, 10 Jul 2024 15:31:59 +0600 Subject: [PATCH] chore: remove deprecated inputFieldWidth (#7364) --- .../components/form/FormFieldGenerator.tsx | 5 ---- packages/client/src/forms/index.ts | 2 -- packages/client/src/tests/forms.json | 27 +++++++------------ .../views/SysAdmin/Config/Systems/Systems.tsx | 1 - .../components/src/TextInput/TextInput.tsx | 1 - 5 files changed, 9 insertions(+), 27 deletions(-) diff --git a/packages/client/src/components/form/FormFieldGenerator.tsx b/packages/client/src/components/form/FormFieldGenerator.tsx index 6bace547f7..b2c5ed9a0c 100644 --- a/packages/client/src/components/form/FormFieldGenerator.tsx +++ b/packages/client/src/components/form/FormFieldGenerator.tsx @@ -502,10 +502,6 @@ const GeneratedInputField = React.memo( ) } if (fieldDefinition.type === NUMBER) { - let inputFieldWidth = fieldDefinition.inputFieldWidth - if (fieldDefinition?.inputWidth) { - inputFieldWidth = fieldDefinition.inputWidth + 'px' - } return ( ( onWheel={(event: React.WheelEvent) => { event.currentTarget.blur() }} - inputFieldWidth={inputFieldWidth} /> ) diff --git a/packages/client/src/forms/index.ts b/packages/client/src/forms/index.ts index 2b540824aa..4f2042397b 100644 --- a/packages/client/src/forms/index.ts +++ b/packages/client/src/forms/index.ts @@ -580,7 +580,6 @@ export interface INumberFormField extends IFormFieldBase { type: typeof NUMBER step?: number max?: number - inputFieldWidth?: string inputWidth?: number maxLength?: number } @@ -1086,7 +1085,6 @@ export interface Ii18nNumberFormField extends Ii18nFormFieldBase { type: typeof NUMBER step?: number max?: number - inputFieldWidth?: string inputWidth?: number maxLength?: number } diff --git a/packages/client/src/tests/forms.json b/packages/client/src/tests/forms.json index 84a4dc92e4..c716177a3f 100644 --- a/packages/client/src/tests/forms.json +++ b/packages/client/src/tests/forms.json @@ -476,8 +476,7 @@ "operation": "bundleFieldToSectionFieldTransformer", "parameters": [] } - }, - "inputFieldWidth": "78px" + } }, { "name": "placeOfBirthTitle", @@ -1011,8 +1010,7 @@ "expression": "((values.informantType===\"MOTHER\") || (values.informantType===\"FATHER\") || (!values.informantType))" } ], - "postfix": "years", - "inputFieldWidth": "78px" + "postfix": "years" }, { "name": "nationality", @@ -2403,8 +2401,7 @@ "expression": "!values.exactDateOfBirthUnknown || !values.detailsExist" } ], - "postfix": "years", - "inputFieldWidth": "78px" + "postfix": "years" }, { "name": "firstNamesEng", @@ -2934,8 +2931,7 @@ "expression": "!values.exactDateOfBirthUnknown || (!values.detailsExist)" } ], - "postfix": "years", - "inputFieldWidth": "78px" + "postfix": "years" }, { "name": "firstNamesEng", @@ -3808,8 +3804,7 @@ "expression": "!values.exactDateOfBirthUnknown" } ], - "postfix": "years", - "inputFieldWidth": "78px" + "postfix": "years" }, { "name": "firstNamesEng", @@ -4786,8 +4781,7 @@ "expression": "!values.exactDateOfBirthUnknown" } ], - "postfix": "years", - "inputFieldWidth": "78px" + "postfix": "years" }, { "name": "nationality", @@ -6704,8 +6698,7 @@ "expression": "(!values.informantType || values.informantType === \"BRIDE\" || values.informantType === \"GROOM\")" } ], - "postfix": "years", - "inputFieldWidth": "78px" + "postfix": "years" }, { "name": "nationality", @@ -8080,8 +8073,7 @@ "expression": "!values.exactDateOfBirthUnknown" } ], - "postfix": "years", - "inputFieldWidth": "78px" + "postfix": "years" }, { "name": "nationality", @@ -9333,8 +9325,7 @@ "expression": "!values.exactDateOfBirthUnknown" } ], - "postfix": "years", - "inputFieldWidth": "78px" + "postfix": "years" }, { "name": "nationality", diff --git a/packages/client/src/views/SysAdmin/Config/Systems/Systems.tsx b/packages/client/src/views/SysAdmin/Config/Systems/Systems.tsx index a59220408c..4fb2afe053 100644 --- a/packages/client/src/views/SysAdmin/Config/Systems/Systems.tsx +++ b/packages/client/src/views/SysAdmin/Config/Systems/Systems.tsx @@ -528,7 +528,6 @@ export function SystemList() { value={newClientName} onChange={onChangeClientName} error={false} - inputFieldWidth="100%" /> diff --git a/packages/components/src/TextInput/TextInput.tsx b/packages/components/src/TextInput/TextInput.tsx index 65365b4e4c..e88a2b0bc6 100644 --- a/packages/components/src/TextInput/TextInput.tsx +++ b/packages/components/src/TextInput/TextInput.tsx @@ -19,7 +19,6 @@ export interface ICustomProps { autocomplete?: boolean isSmallSized?: boolean // Deprecated isDisabled?: boolean - inputFieldWidth?: string // Deprecated hasPrefix?: boolean hasPostfix?: boolean prefix?: React.ReactNode | string