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

235
Views
Para buscar usando la API, estoy enviando la entrada al backend usando la interpolación de cadenas en reaccionar

Estoy enviando como "oemName": %${''}% que funciona bien pero sin % no funciona, lo que hace que me pregunte por qué sucede.

 const getEquipmentNameSearch = async (SearchText?: any) => { console.log("Args", SearchText) try { const responseData: any = await client.query({ query: SEARCH_EQUIPMENTS_BY_NAME, variables: { "oemName": SearchText === undefined ? `%${''}%` : `%${SearchText}%`, // "oemName": `${''}` }, fetchPolicy: 'network-only', context: { role: MasterMaterialRoles.read }, }); const filteredResult = responseData.data.equipmentMaster?.filter((item: any) => item.oemName.toLowerCase().includes(SearchText?.toLowerCase())) const responseDataList = SearchText ? filteredResult : responseData.data.equipmentMaster dispatch({ type: GET_EQUIPMENT_MASTER, payload: responseDataList, }); } catch (error: any) { console.log('err:', error) } }

Al usar directamente ${''} obtengo '' en la carga útil, pero no se muestra nada en la página.

Carga útil

about 4 years ago · Juan Pablo Isaza
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!