Skip to content

Commit

Permalink
found a better way than in the github issue...
Browse files Browse the repository at this point in the history
  • Loading branch information
MikesGlitch committed Oct 4, 2023
1 parent e18c3c4 commit af935b6
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,7 @@ function SingleAutocomplete({
},
onBlur: e => {
// Should this be e.nativeEvent
// preventDownshiftDefault is a downshift.js property - they don't have types for it on the React event
// Suggested way to make this work with typescript is to cast as any... https://github.com/downshift-js/downshift/issues/734
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(e as any).preventDownshiftDefault = true;
e['preventDownshiftDefault'] = true;
inputProps.onBlur?.(e);

if (!closeOnBlur) return;
Expand Down

0 comments on commit af935b6

Please sign in to comment.