mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
Fix handler in form/field hooks
This commit is contained in:
parent
617dd32f4f
commit
bc87c1d883
2 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ import { useCallback, useState } from 'react';
|
|||
export default (initialValue) => {
|
||||
const [value, setValue] = useState(initialValue);
|
||||
|
||||
const handleChange = useCallback(({ target: { value: nextValue } }) => {
|
||||
const handleChange = useCallback((_, { value: nextValue }) => {
|
||||
setValue(nextValue);
|
||||
}, []);
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { useCallback, useState } from 'react';
|
|||
export default (initialData) => {
|
||||
const [data, setData] = useState(initialData);
|
||||
|
||||
const handleFieldChange = useCallback(({ target: { name: fieldName } }, { value }) => {
|
||||
const handleFieldChange = useCallback((_, { name: fieldName, value }) => {
|
||||
setData((prevData) => ({
|
||||
...prevData,
|
||||
[fieldName]: value,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue