Skip to content

Commit 6b6aa44

Browse files
authored
Add disabled prop to TextInput component (#771)
1 parent ef6bc2a commit 6b6aa44

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/inputs/reactHookForm/text/TextInput.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export interface TextInputProps {
3737
'value' | 'onChange' | 'inputRef' | 'inputProps' | 'InputProps'
3838
>;
3939
disabledTooltip?: boolean;
40+
disabled?: boolean;
4041
}
4142

4243
export function TextInput({
@@ -53,6 +54,7 @@ export function TextInput({
5354
clearable,
5455
formProps,
5556
disabledTooltip, // In case we don't want to show tooltip on the value and warning/info icons
57+
disabled,
5658
}: TextInputProps) {
5759
const { validationSchema, getValues, removeOptional, isNodeBuilt, isUpdate } = useCustomFormContext();
5860
const {
@@ -124,6 +126,7 @@ export function TextInput({
124126
{...genHelperError(error?.message)}
125127
{...formProps}
126128
{...(adornment && { ...finalAdornment })}
129+
disabled={disabled}
127130
/>
128131
);
129132
}

0 commit comments

Comments
 (0)