Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

198
Visualizações
primeng tooltip not positioning correctly on horizontally scrolling page

I've got a page that, on certain screen widths, requires horizontal scrolling. Towards one end of the page, I've got a dropdown with primeng MenuItem objects, set to display a tooltip. Trouble is, if the dropdown is off the screen by default, and the user scrolls to the right, the tooltip appears where the edge of the screen would be without scrolling (i.e. it appears a bit further to the left, hovering over nothing in particular). This happens regardless of what the appendTo or positionStyle property of the tooltip is set to.

html snippet:

<dropdown #dropdownMenu [options]="dropdownOptions"></dropdown>

typescript snippet:

@ViewChild('dropdownMenu') dropdown: DropdownComponent;
dropdownOptions: MenuItem<Thing>[];

/* Bunch of other code */

this.dropdownOptions = [
  {
    label: "Item the first",
    command: (thing: Thing) => this.doThingWithThing(thing),
    tooltipOptions: {
      tooltipLabel: "This is the first item in the list",
      appendTo: "dropdownMenu", // also tried with this.dropdown, same result
      positionStyle: "relative",
      tooltipPosition: "left"
  },
  {
    label: "Item the second",
    command: (thing: Thing) => this.doOtherThingWithThing(thing),
    tooltipOptions: {
      tooltipLabel: "This is the second item in the list",
      appendTo: "dropdownMenu",
      positionStyle: "relative",
      tooltipPosition: "left"
  },
  // and so on
]

What should I be doing to get the tooltip to appear attached to the dropdown and not hovering off of where the edge of the screen would be if the user hadn't scrolled?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda