Force suggestions box to update position when items amount changes
[arvados-workbench2.git] / src / components / autocomplete / autocomplete.tsx
index 13d5f79aad4a72e27f5787c0c5838767e63c2ae0..b464e6a7b76d95385d8a7afaa7fcd2832680c35a 100644 (file)
@@ -76,7 +76,8 @@ export class Autocomplete<Value, Suggestion> extends React.Component<Autocomplet
         return (
             <Popper
                 open={this.state.suggestionsOpen && suggestions.length > 0}
-                anchorEl={this.inputRef.current}>
+                anchorEl={this.inputRef.current}
+                key={suggestions.length}>
                 <Paper onMouseDown={this.preventBlur}>
                     <List dense style={{ width: this.getSuggestionsWidth() }}>
                         {suggestions.map(