Skip to content

Commit c4bdb2e

Browse files
committed
fix autocompletes empty values
1 parent 5d3f605 commit c4bdb2e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

web/src/components/toolbar/filters/autocomplete-filter.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,12 @@ export const AutocompleteFilter: React.FC<AutocompleteFilterProps> = ({
185185
validated={indicator}
186186
placeholder={filterDefinition.placeholder}
187187
value={currentValue}
188-
onKeyDown={e => e.key === 'Enter' && onEnter()}
188+
onKeyDown={e => {
189+
if (e.key === 'Enter') {
190+
onEnter();
191+
e.preventDefault();
192+
}
193+
}}
189194
onChange={(event, value) => onAutoCompleteChange(value)}
190195
onBlur={onBlur}
191196
ref={searchInputRef}

0 commit comments

Comments
 (0)