Skip to content

Commit 634c28c

Browse files
committed
fix: Fix tests
1 parent 86af9fd commit 634c28c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/number_format_base.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ export default function NumberFormatBase<BaseType = InputAttributes>(
434434
);
435435
} else if (customInput) {
436436
const CustomInput = customInput;
437+
// @ts-expect-error
437438
return <CustomInput {...inputProps} ref={getInputRef} />;
438439
}
439440

src/pattern_format.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export function usePatternFormat<BaseType = InputAttributes>(
254254
inputMode,
255255
format: (numStr: string) => format(numStr, _props),
256256
removeFormatting: (inputValue: string, changeMeta: ChangeMeta) =>
257-
removeFormatting(inputValue, changeMeta, _props),
257+
removeFormatting(inputValue, changeMeta, _props),
258258
getCaretBoundary: _getCaretBoundary,
259259
onKeyDown: _onKeyDown,
260260
};

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ export type ChangeMeta = {
4646

4747
export type InputAttributes = Omit<
4848
React.InputHTMLAttributes<HTMLInputElement>,
49-
'defaultValue' | 'value' | 'children'
49+
'defaultValue' | 'children'
5050
>;
5151

5252
type NumberFormatProps<Props, BaseType = InputAttributes> = Props &
5353
Omit<InputAttributes, keyof BaseType> &
5454
Omit<BaseType, keyof Props | 'ref'> & {
55-
customInput?: React.ComponentType<React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
55+
customInput?: React.ComponentType<BaseType>;
5656
};
5757

5858
export type OnValueChange = (values: NumberFormatValues, sourceInfo: SourceInfo) => void;

0 commit comments

Comments
 (0)