Skip to content

Commit 0e66d7d

Browse files
authored
[TextField] Add FormHelperTextSlotPropsOverrides for data attributes
Fixes #47230 Adds TextFieldFormHelperTextSlotPropsOverrides interface to allow developers to augment the formHelperText slot props with custom data-* attributes using module augmentation. Signed-off-by: Dheenadayalan <[email protected]>
1 parent bd1749a commit 0e66d7d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/mui-material/src/TextField/TextField.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
1717
export interface TextFieldPropsColorOverrides {}
1818
export interface TextFieldPropsSizeOverrides {}
1919

20+
2021
export interface TextFieldSlots {
2122
/**
2223
* The component that renders the root.
@@ -77,7 +78,7 @@ export type TextFieldSlotsAndSlotProps<InputPropsType> = CreateSlotsAndSlotProps
7778
* Props forwarded to the form helper text slot.
7879
* By default, the available props are based on the [FormHelperText](https://mui.com/material-ui/api/form-helper-text/#props) component.
7980
*/
80-
formHelperText: SlotProps<React.ElementType<FormHelperTextProps>, {}, TextFieldOwnerState>;
81+
formHelperText: SlotProps<React.ElementType<FormHelperTextProps>, TextFieldFormHelperTextSlotPropsOverrides, TextFieldOwnerState>;
8182
/**
8283
* Props forwarded to the select slot.
8384
* By default, the available props are based on the [Select](https://mui.com/material-ui/api/select/#props) component.

0 commit comments

Comments
 (0)