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 4b96bbb commit 4dd1a1e
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 4dd1a1e

Please sign in to comment.