Skip to content

Commit

Permalink
enhance
Browse files Browse the repository at this point in the history
  • Loading branch information
barbalex committed Nov 24, 2024
1 parent b4b7280 commit 8944331
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/AppBar/EkfBar/EkfYear.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ export const EkfYear = () => {

useEffect(() => setStateValue(ekfYear), [ekfYear])

const onChange = useCallback(
(event) => setStateValue(event.target.value ? +event.target.value : ''),
[],
)
const onBlur = useCallback(
(event) => {
const newValue = event.target.value ? +event.target.value : ekfRefYear
navigate(`/Daten/Benutzer/${userId}/EKF/${newValue}${search}`)
},
[navigate, search, userId],
)
const onChange = useCallback((event) => {
setStateValue(event.target.value ? +event.target.value : '')
if (event.target.value.length === 4) onBlur(event)
}, [])

return (
<Container>
Expand Down

0 comments on commit 8944331

Please sign in to comment.