@@ -129,7 +129,7 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
129
129
*
130
130
* @default {}
131
131
*/
132
- SelectProps ?: SelectPropsVariant ;
132
+ SelectProps ?: Partial < SelectProps > ;
133
133
/**
134
134
* If `true`, show the first-page button.
135
135
* @default false
@@ -146,7 +146,7 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
146
146
*/
147
147
slotProps ?: {
148
148
actions ?: TablePaginationActionsProps [ 'slotProps' ] ;
149
- select ?: Partial < SelectProps > ;
149
+ select ?: SelectPropsVariant < TablePaginationVariants > ;
150
150
} ;
151
151
/**
152
152
* The system prop that allows defining system overrides as well as additional CSS styles.
@@ -156,19 +156,13 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
156
156
157
157
type TablePaginationVariants = 'filled' | 'standard' | 'outlined' ;
158
158
159
- type SelectInputProps < Variant extends TablePaginationVariants > = Variant extends 'filled'
160
- ? Partial < FilledInputProps >
161
- : Variant extends 'standard'
162
- ? Partial < StandardInputProps >
163
- : Partial < OutlinedInputProps > ;
164
-
165
- export interface SelectPropsVariant <
166
- Variant extends TablePaginationVariants = TablePaginationVariants ,
167
- > extends Partial < SelectProps > {
168
- variant ?: Variant ;
169
- InputProps ?: SelectInputProps < Variant > ;
170
- // ... (other variant-specific props)
171
- }
159
+ // Extend SelectProps based on the variant
160
+ type SelectPropsVariant < Variant extends TablePaginationVariants > = Partial < SelectProps > &
161
+ ( Variant extends 'filled'
162
+ ? Partial < FilledInputProps >
163
+ : Variant extends 'standard'
164
+ ? Partial < StandardInputProps >
165
+ : Partial < OutlinedInputProps > ) ;
172
166
173
167
export interface TablePaginationTypeMap < AdditionalProps , RootComponent extends React . ElementType > {
174
168
props : AdditionalProps & TablePaginationOwnProps ;
0 commit comments