1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

#34 removed isLoading from textarea

This commit is contained in:
Fedor Katurov 2021-02-26 17:24:52 +07:00
parent d7b4fbf535
commit f45e34f330
2 changed files with 4 additions and 4 deletions

View file

@ -8,8 +8,8 @@ interface IProps {
setRef?: (r: HTMLTextAreaElement) => void;
}
const LocalCommentFormTextarea: FC<IProps> = ({ isLoading, setRef }) => {
const { values, handleChange, handleSubmit } = useCommentFormContext();
const LocalCommentFormTextarea: FC<IProps> = ({ setRef }) => {
const { values, handleChange, handleSubmit, isSubmitting } = useCommentFormContext();
const onKeyDown = useCallback<KeyboardEventHandler<HTMLTextAreaElement>>(
({ ctrlKey, key }) => {
@ -25,7 +25,7 @@ const LocalCommentFormTextarea: FC<IProps> = ({ isLoading, setRef }) => {
value={values.text}
handler={handleChange('text')}
onKeyDown={onKeyDown}
disabled={isLoading}
disabled={isSubmitting}
placeholder={placeholder}
minRows={2}
setRef={setRef}