gitlab-lint-react icon indicating copy to clipboard operation
gitlab-lint-react copied to clipboard

fix: changing debounce behaviour, adding preventDefault to event on search input

Open GabhenDM opened this issue 4 years ago • 0 comments

This PR aims to fix two bugs on the search behaviour.

  1. Search stopped working during the fix of a warning regarding the debounce implementation, using useMemo with an inline func instead of useCallback (both in the end will have the same behaviour, but fixes the weird linting error and doesn't break)
  2. Pressing enter after typing the search query would result in the form post going off, added event.preventDefault() to called function (oops)

GabhenDM avatar Jan 11 '22 03:01 GabhenDM