Преглед изворни кода

make enter button work on search

Ivan Galakhov пре 4 година
родитељ
комит
e1a817ac1d
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      dashboard/src/components/repo-selector/RepoList.tsx

+ 5 - 0
dashboard/src/components/repo-selector/RepoList.tsx

@@ -173,6 +173,11 @@ const RepoList: React.FC<Props> = ({
                 onChange={(e: any) => {
                   setSearchInput(e.target.value);
                 }}
+                onKeyPress={({ key }) => {
+                  if (key === "Enter") {
+                    setSearchFilter(searchInput);
+                  }
+                }}
                 placeholder="Search repos..."
               />
             </SearchBar>