Insured onAuthorChanged saves numeric value instead of a string value
parent
c2fec6e6fe
commit
82d81f76a8
|
@ -29,7 +29,7 @@ const EditPostForm = () => {
|
||||||
|
|
||||||
const onTitleChanged = e => setTitle(e.target.value)
|
const onTitleChanged = e => setTitle(e.target.value)
|
||||||
const onContentChanged = e => setContent(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';
|
const canSave = [title, content, userId].every(Boolean) && requestStatus === 'idle';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue