Explorar el Código

fix: allow searching with space

Fela Maslen hace 5 años
padre
commit
28b45ef4b7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      gmus-web/src/components/ui/cmus/search.tsx

+ 1 - 1
gmus-web/src/components/ui/cmus/search.tsx

@@ -17,7 +17,7 @@ export const Search: React.FC = () => {
         dispatchUI(searched(null));
       } else if (event.key === 'Backspace') {
         setTerm((last) => last.substring(0, last.length - 1));
-      } else if (/^\w$/.test(event.key)) {
+      } else if (/^[\w\s]$/.test(event.key)) {
         setTerm((last) => `${last}${event.key}`);
       }
     };