From af935b660ea1b026a83d9de9308b2e523bccd248 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;