Skip to content

Commit

Permalink
fix(export): l'événement est soit une chaine (combobox) soit un Event
Browse files Browse the repository at this point in the history
  • Loading branch information
thom4parisot committed Jan 23, 2025
1 parent 3c8884d commit b549abd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions front/src/components/Export.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ export default function Export(props) {
} = useSelector((state) => state.exportPreferences, shallowEqual)

const setPreference = useCallback(
(key) => (event) =>
dispatch({
type: 'SET_EXPORT_PREFERENCES',
key,
value: event.target.value,
}),
/** @param {string} key */ (key) =>
/** @param {string|Event} event */ (event) =>
dispatch({
type: 'SET_EXPORT_PREFERENCES',
key,
value: event?.target?.value ?? event,
}),
[]
)

Expand Down

0 comments on commit b549abd

Please sign in to comment.