Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

fix: resolve mobile keyboard fluctuation during search #9248

Merged
merged 16 commits into from
Nov 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: rename variable searchTerm to searchInputVal
  • Loading branch information
badrivlog committed Nov 14, 2023
commit d39b043a31cea3666dfae52b41a3a444e3b97d9a
6 changes: 3 additions & 3 deletions pages/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ export default function Search({
function removeComma(value) {
return value.replace(/,(\s*),/g, ",").replace(/^,/, "");
}
const searchTerm = removeComma(
const searchInputVal = removeComma(
cleanSearchInput(searchInputRef.current.value),
);

if (!searchTerm) {
if (!searchInputVal) {
params.delete("userSearchParam");
} else {
params.set("userSearchParam", searchTerm);
params.set("userSearchParam", searchInputVal);
}

replace(
Expand Down