zregvart commented on a change in pull request #286: CAMEL-14797: Fixes The 
Quick Look Up issue
URL: https://github.com/apache/camel-website/pull/286#discussion_r400471033
 
 

 ##########
 File path: antora-ui-camel/src/js/05-nav-search.js
 ##########
 @@ -6,9 +6,18 @@ document.addEventListener('DOMContentLoaded', function () {
   if (!navSearch) {
     return
   }
-
+  var navToggle = document.querySelectorAll('.nav-item-toggle')
   var navLinks = document.querySelectorAll('.nav-link')
   navSearch.addEventListener('keyup', function () {
+    if (navSearch.value === '') {
+      for (var b = 0; b < navToggle.length; b++) {
+        navToggle[b].style.display = 'block'
+      }
+    } else {
+      for (b = 0; b < navToggle.length; b++) {
 
 Review comment:
   Declare variable using `var`/`let`. Could bring `b` into global scope.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to