Skip to content

Commit 10b363c

Browse files
[cleaning-the-perseus-finddom] Remove cast
1 parent 504bb38 commit 10b363c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/perseus/src/components/simple-keypad-input.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import {KeypadInput, keypadElementPropType} from "@khanacademy/math-input";
1313
import PropTypes from "prop-types";
1414
import * as React from "react";
1515

16+
import type {Focusable} from "../types";
17+
1618
type SimpleKeypadInputProps = {
1719
keypadElement?: any;
1820
onFocus: () => void;
@@ -23,7 +25,7 @@ type SimpleKeypadInputProps = {
2325
style?: React.CSSProperties;
2426
};
2527

26-
const SimpleKeypadInput = React.forwardRef<HTMLElement, SimpleKeypadInputProps>(
28+
const SimpleKeypadInput = React.forwardRef<Focusable, SimpleKeypadInputProps>(
2729
function SimpleKeypadInput(props, ref) {
2830
const keypadInputRef = React.useRef<any>(null);
2931
const context = React.useContext(KeypadContext);

packages/perseus/src/widgets/numeric-input/numeric-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const NumericInputComponent = forwardRef<Focusable, NumericInputProps>(
8787
return (
8888
<div className={alignmentClass}>
8989
<SimpleKeypadInput
90-
ref={inputRef as React.RefObject<HTMLInputElement>}
90+
ref={inputRef}
9191
value={props.userInput.currentValue}
9292
keypadElement={props.keypadElement}
9393
onChange={handleChange}

0 commit comments

Comments
 (0)