Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
¿Cómo puedo hacer que mi motor de búsqueda de reacción acepte letras mayúsculas y minúsculas?

Hola, mi aplicación de reacción es una lista de tareas y tiene un motor de búsqueda para filtrar notas, actualmente funciona si buscas la nota pero en minúsculas, ¿cómo podría hacer que acepte tanto mayúsculas como minúsculas?

Por ejemplo, para la nota de javaScript, la encontraría si pongo JAVAscrIPT o jAVAscriPT.

este es mi codigo

 const App = () => { const [notes, setNotes] = useState([]); const [searchText, setSearchText] = useState(''); const [showNote, setShowNote] = useState(true); //eslint-disable-lint const addNote = (inputText, text) => { const date = new Date(); const newNote = { id: nanoid(), title: inputText, text: text, date: date.toLocaleString() } const newNotes = [newNote, ...notes]; setNotes(newNotes) } const filterNotes = notes.filter((noteText) => noteText.title.toLowerCase().includes(searchText)); //rest of code

Un saludo y gracias de antemano!

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Olvidaste usar toLowerCase en searchText

 const filterNotes = notes.filter((noteText) => noteText.title.toLowerCase().includes(searchText.toLowerCase()));
about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!