From 4dd1a1e0eeeb7f4e5faa494b582c8542c94b9908 Mon Sep 17 00:00:00 2001 From: Mike Clark Date: Wed, 4 Oct 2023 22:15:19 +0100 Subject: [PATCH] found a better way than in the github issue... --- .../src/components/autocomplete/Autocomplete.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx index 94b7bd8e943..8a903955dfc 100644 --- a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx @@ -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;