Insured onAuthorChanged saves numeric value instead of a string value

02_lesson
gitdagray 2022-04-11 08:34:18 -05:00
parent c2fec6e6fe
commit 82d81f76a8
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ const EditPostForm = () => {
const onTitleChanged = e => setTitle(e.target.value)
const onContentChanged = e => setContent(e.target.value)
const onAuthorChanged = e => setUserId(e.target.value)
const onAuthorChanged = e => setUserId(Number(e.target.value))
const canSave = [title, content, userId].every(Boolean) && requestStatus === 'idle';