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

380
Views
deshabilite una opción para eliminar un elemento del autocompletado múltiple primeng

Cualquier pista sobre cómo deshabilitar una opción para eliminar un elemento del componente múltiple de autocompletar ( https://www.primefaces.org/primeng/showcase/#/autocomplete ), quiero evitar eliminar un elemento (que contiene un campo, es decir remove:false ) después de que el usuario presione el botón de retroceso o haga clic en el icono x. Por ejemplo, si elige 'Afganistán', no debería poder eliminarlo.

Intenté lo siguiente pero sin éxito: https://stackblitz.com/edit/primeng-autocomplete-demo-tdoe5g?file=src/app/app.component.ts

html:

 <p-autoComplete (onUnselect)="avoidRemoval($event); false" ... />

t:

 avoidRemoval(event){ if(!event.remove){ event.preventDefault() //event.preventDefault is not a function } } // nothing is happening here @HostListener("document:keyup", ["$event"]) handleKeyup(event: KeyboardEvent) { if (event.keyCode === 8) { event.preventDefault(); //event.stopPropagation(); //return false; } }
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!