@@ -14,11 +14,9 @@ import { CaretDownIcon } from '@patternfly/react-icons';
1414import  *  as  _  from  'lodash' ; 
1515import  *  as  React  from  'react' ; 
1616import  {  createFilterValue ,  FilterDefinition ,  FilterOption ,  FilterValue  }  from  '../../../model/filters' ; 
17- import  {  autoCompleteCache  }  from  '../../../utils/autocomplete-cache' ; 
1817import  {  getHTTPErrorDetails  }  from  '../../../utils/errors' ; 
1918import  {  undefinedValue  }  from  '../../../utils/filter-definitions' ; 
2019import  {  Indicator  }  from  '../../../utils/filters-helper' ; 
21- import  {  usePrevious  }  from  '../../../utils/previous-hook' ; 
2220import  './autocomplete-filter.css' ; 
2321
2422const  optionsMenuID  =  'options-menu-list' ; 
@@ -49,16 +47,9 @@ export const AutocompleteFilter: React.FC<AutocompleteFilterProps> = ({
4947  const  searchInputRef  =  React . useRef < HTMLInputElement  |  null > ( null ) ; 
5048  const  optionsRef  =  React . useRef < HTMLDivElement  |  null > ( null ) ; 
5149  const  [ options ,  setOptions ]  =  React . useState < FilterOption [ ] > ( [ ] ) ; 
52-   const  previousFilterDefinition  =  usePrevious ( filterDefinition ) ; 
5350
5451  React . useEffect ( ( )  =>  { 
55-     if  ( filterDefinition  !==  previousFilterDefinition )  { 
56-       //reset filter value if definition has changed 
57-       resetFilterValue ( ) ; 
58-       searchInputRef . current ?. focus ( ) ; 
59-       searchInputRef . current ?. setAttribute ( 'autocomplete' ,  'off' ) ; 
60-       autoCompleteCache . clear ( ) ; 
61-     }  else  if  ( _ . isEmpty ( currentValue ) )  { 
52+     if  ( _ . isEmpty ( currentValue ) )  { 
6253      setIndicator ( ValidatedOptions . default ) ; 
6354    }  else  { 
6455      //update validation icon on field on value change 
0 commit comments