• Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Precios
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

78
Vistas
How to make sure that when entering the input, the "+" sign does not give out like this "% 2b"?

Here's how you can get rid of this so that the "+" sign is always displayed, and not incomprehensible characters? I don’t know how you can write the code for it to work normally

   const [isSearchOpen, setSearchOpen] = useState(false),
       formRef = useRef(null);
   useClickOutside(formRef, () => setSearchOpen(false));
   const [inputText, setInputText] = useState("");
   const handleSubmit = e => {
       if (inputText.length >= 150) {
           alert('Maximum length 150 characters ')
           e.preventDefault();
       }
   };


   return (
       <form
           ref={formRef}
           className={cn("search-form", {
               "search-form--focus": isSearchOpen,
           })}
           onClick={() => setSearchOpen(true)}
           onKeyPress={() => setSearchOpen(true)}
           action="/search"
           // eslint-disable-next-line
           role="searchbox"
           onSubmit={handleSubmit}
       >
           
           <input
               value={inputText}
               onChange={e => setInputText(e.target.value)}
               className="search-form__input"
               name="filter"
               type="text"
           
           />
         
           
           <button
               className="search-form__button"
               type="submit"
               aria-label="Header search button"
           />
       </form>
   );
};
9 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.