We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e9fe89 commit 90633afCopy full SHA for 90633af
frontend/src/hooks/use-text-input.hook.ts
@@ -2,7 +2,7 @@ import { useState } from 'react';
2
3
type InputValue = HTMLTextAreaElement | HTMLInputElement | HTMLSelectElement;
4
5
-export const useTextInput = <T extends InputValue, S = string>(
+export const useTextInput = <T extends InputValue, S extends string = string>(
6
initialState: string
7
): [S, React.ChangeEventHandler<T>] => {
8
const [value, setValue] = useState<S>(initialState as S);
0 commit comments