Skip to content

Commit

Permalink
chore: remove deprecated inputFieldWidth (#7364)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zangetsu101 authored Jul 10, 2024
1 parent 717d589 commit 722bfeb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 27 deletions.
5 changes: 0 additions & 5 deletions packages/client/src/components/form/FormFieldGenerator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,6 @@ const GeneratedInputField = React.memo<GeneratedInputFieldProps>(
)
}
if (fieldDefinition.type === NUMBER) {
let inputFieldWidth = fieldDefinition.inputFieldWidth
if (fieldDefinition?.inputWidth) {
inputFieldWidth = fieldDefinition.inputWidth + 'px'
}
return (
<InputField {...inputFieldProps}>
<TextInput
Expand All @@ -527,7 +523,6 @@ const GeneratedInputField = React.memo<GeneratedInputFieldProps>(
onWheel={(event: React.WheelEvent<HTMLInputElement>) => {
event.currentTarget.blur()
}}
inputFieldWidth={inputFieldWidth}
/>
</InputField>
)
Expand Down
2 changes: 0 additions & 2 deletions packages/client/src/forms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,6 @@ export interface INumberFormField extends IFormFieldBase {
type: typeof NUMBER
step?: number
max?: number
inputFieldWidth?: string
inputWidth?: number
maxLength?: number
}
Expand Down Expand Up @@ -1086,7 +1085,6 @@ export interface Ii18nNumberFormField extends Ii18nFormFieldBase {
type: typeof NUMBER
step?: number
max?: number
inputFieldWidth?: string
inputWidth?: number
maxLength?: number
}
Expand Down
27 changes: 9 additions & 18 deletions packages/client/src/tests/forms.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,7 @@
"operation": "bundleFieldToSectionFieldTransformer",
"parameters": []
}
},
"inputFieldWidth": "78px"
}
},
{
"name": "placeOfBirthTitle",
Expand Down Expand Up @@ -1011,8 +1010,7 @@
"expression": "((values.informantType===\"MOTHER\") || (values.informantType===\"FATHER\") || (!values.informantType))"
}
],
"postfix": "years",
"inputFieldWidth": "78px"
"postfix": "years"
},
{
"name": "nationality",
Expand Down Expand Up @@ -2403,8 +2401,7 @@
"expression": "!values.exactDateOfBirthUnknown || !values.detailsExist"
}
],
"postfix": "years",
"inputFieldWidth": "78px"
"postfix": "years"
},
{
"name": "firstNamesEng",
Expand Down Expand Up @@ -2934,8 +2931,7 @@
"expression": "!values.exactDateOfBirthUnknown || (!values.detailsExist)"
}
],
"postfix": "years",
"inputFieldWidth": "78px"
"postfix": "years"
},
{
"name": "firstNamesEng",
Expand Down Expand Up @@ -3808,8 +3804,7 @@
"expression": "!values.exactDateOfBirthUnknown"
}
],
"postfix": "years",
"inputFieldWidth": "78px"
"postfix": "years"
},
{
"name": "firstNamesEng",
Expand Down Expand Up @@ -4786,8 +4781,7 @@
"expression": "!values.exactDateOfBirthUnknown"
}
],
"postfix": "years",
"inputFieldWidth": "78px"
"postfix": "years"
},
{
"name": "nationality",
Expand Down Expand Up @@ -6704,8 +6698,7 @@
"expression": "(!values.informantType || values.informantType === \"BRIDE\" || values.informantType === \"GROOM\")"
}
],
"postfix": "years",
"inputFieldWidth": "78px"
"postfix": "years"
},
{
"name": "nationality",
Expand Down Expand Up @@ -8080,8 +8073,7 @@
"expression": "!values.exactDateOfBirthUnknown"
}
],
"postfix": "years",
"inputFieldWidth": "78px"
"postfix": "years"
},
{
"name": "nationality",
Expand Down Expand Up @@ -9333,8 +9325,7 @@
"expression": "!values.exactDateOfBirthUnknown"
}
],
"postfix": "years",
"inputFieldWidth": "78px"
"postfix": "years"
},
{
"name": "nationality",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ export function SystemList() {
value={newClientName}
onChange={onChangeClientName}
error={false}
inputFieldWidth="100%"
/>
</InputField>
</Field>
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 722bfeb

Please sign in to comment.