MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / toggleDropdownMenu

Function toggleDropdownMenu

web/pgadmin/static/js/QuickSearch/index.jsx:172–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170 useDelayDebounce(initSearch, searchTerm, 1000);
171
172 const toggleDropdownMenu = () => {
173 let pooling = window.pooling;
174 if(pooling){
175 window.clearInterval(pooling);
176 }
177 document.getElementsByClassName('live-search-field')[0].value = '';
178 setTimeout(function(){
179 document.getElementById('live-search-field').focus();
180 },100);
181 resetSearchState();
182 setShowResults(!showResults);
183 setIsMenuLoading(false);
184 setIsHelpLoading(false);
185 setIsShowMinLengthMsg(false);
186 };
187
188 const refactorMenuItems = (items) => {
189 if(items.length > 0){

Callers 1

handleClickOutsideFunction · 0.85

Calls 2

resetSearchStateFunction · 0.85
focusMethod · 0.80

Tested by

no test coverage detected