(param)
| 150 | }, [menuSearchResult, helpSearchResult]); |
| 151 | |
| 152 | const initSearch = (param) => { |
| 153 | if(param.length < 3) { |
| 154 | return; |
| 155 | } |
| 156 | setIsMenuLoading(true); |
| 157 | setIsHelpLoading(true); |
| 158 | |
| 159 | onlineHelpSearch(param, { |
| 160 | state: helpSearchResult, |
| 161 | setState: setHelpSearchResult, |
| 162 | }); |
| 163 | menuSearch(param, { |
| 164 | state: menuSearchResult, |
| 165 | setState: setMenuSearchResult, |
| 166 | }); |
| 167 | }; |
| 168 | |
| 169 | // Debounse logic to avoid multiple re-render with each keypress |
| 170 | useDelayDebounce(initSearch, searchTerm, 1000); |
nothing calls this directly
no test coverage detected