Skip to content

Commit 1e4b623

Browse files
jaulzTrancever
authored andcommitted
fix: omit ref in TextInput props type (#1361)
1 parent 9f7bb6b commit 1e4b623

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/components/TextInput/TextInput.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import TextInputOutlined from './TextInputOutlined';
1010
import TextInputFlat from './TextInputFlat';
1111
import { withTheme } from '../../core/theming';
1212
import { RenderProps, State } from './types';
13-
import { Theme } from '../../types';
13+
import { Theme, $Omit } from '../../types';
1414

1515
const BLUR_ANIMATION_DURATION = 180;
1616
const FOCUS_ANIMATION_DURATION = 150;
@@ -398,8 +398,10 @@ class TextInput extends React.Component<TextInputProps, State> {
398398
}
399399

400400
render() {
401-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
402-
const { mode, padding, ref: outerRef, ...rest } = this.props;
401+
const { mode, padding, ...rest } = this.props as $Omit<
402+
TextInputProps,
403+
'ref'
404+
>;
403405

404406
return mode === 'outlined' ? (
405407
<TextInputOutlined

0 commit comments

Comments
 (0)