components: memoize and streamline callbacks
This commit is contained in:
@@ -7,11 +7,12 @@ import "./SizeInput.css";
|
||||
type SizeInputProps = {};
|
||||
|
||||
const handleFocus = (event: React.UIEvent<HTMLInputElement>) => {
|
||||
const { currentTarget } = event;
|
||||
currentTarget.focus();
|
||||
event.preventDefault();
|
||||
event.currentTarget.focus();
|
||||
};
|
||||
|
||||
const handleBlur = (event: React.UIEvent<HTMLInputElement>) => {
|
||||
event.preventDefault();
|
||||
event.currentTarget.blur();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user