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

114
Views
Lista de botones angulares, desbordamiento en la lista en lugar de ajuste

Tengo una lista de botones: ingrese la descripción de la imagen aquí

cuando hay desbordamiento, quiero que los botones estén en una lista desplegable como esta:

ingrese la descripción de la imagen aquí

Y necesito que sea dinámico (reorganizar el cambio de tamaño de página)

Intenté esto:

 ngAfterViewInit() { const width = this.container.nativeElement.offsetWidth; const fittingActions = [...this.container.nativeElement.children]; let fittingActionsWidth = 0; for (const action of fittingActions) { fittingActionsWidth = fittingActionsWidth + action.clientWidth if (fittingActionsWidth < width) { this.actionCountToDisplay = this.actionCountToDisplay + 1 } } }
 <ng-container *ngFor="let action of actionButtons.slice(0, actionCountToDisplay || actionButtons.length)"> <button (click)="action.onClick($event)" mat-flat-button color="primary"> <span>{{action.label}}</span> </button> </ng-container>

pero no funciono bien

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!