Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip | fit-content support #11502

Closed
rosenthalj opened this issue May 10, 2022 · 1 comment · Fixed by #11556
Closed

Tooltip | fit-content support #11502

rosenthalj opened this issue May 10, 2022 · 1 comment · Fixed by #11556
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@rosenthalj
Copy link
Contributor

I'm submitting a ... (check one with "x")

[x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
https://primeng-tablefilter-demo-jdhm7o.stackblitz.io

Current behavior
Tooltips that are at the end of a horizontally scrolled table are displayed in a narrow panel approximately one character wide

tooltip.mov

I investigated this issue and found that if I added the following line: this.container.style.width = 'fit-content'; to the end of tooltip class's create method, it appears to fix the problem. I didn't feel I knew the code well enough to create a pull request. Hopefully my investigation will help in determining the "correct" code change.

tooltipSource

Expected behavior
Tooltips should be displayed properly whether or not the content of a table is scrolled.

Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/primeng-tablefilter-demo-jdhm7o?file=src%2Fapp%2Fcustomerservice.ts,src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.module.ts

I modified the PrimeNG table filter demo as follows:

  • I added 3 tooltips to the filter icon/buttons.
  • I added a dropdown menu to expand the width of the table.
    -- removed most of the data and removed the second filter table example

To reproduce the problem:

  • Run the stackblitz example
    -- https://primeng-tablefilter-demo-jdhm7o.stackblitz.io
  • Mouse over the "filter" icon in the last three columns
    -- The tooltips will look correct
  • Change the the "Toggle Table Width" dropdown to "Very Wide"
  • Horizontally scroll the table to the far right
  • Mouse over the "filter" icon in the last three columns
    -- The tooltips will look incorrect. A narrow panel approximately one character wide

What is the motivation / use case for changing the behavior?
fix a bug

  • Angular version:
    13.x

  • PrimeNG version:
    13.x

  • Browser:
    Chrome
    FireFox
    Safari

@cetincakiroglu cetincakiroglu self-assigned this May 25, 2022
@cetincakiroglu cetincakiroglu added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label May 25, 2022
@cetincakiroglu cetincakiroglu added this to the 13.4.2 milestone May 25, 2022
@cetincakiroglu cetincakiroglu changed the title Tooltips are improperly displayed within a scrolled table Tooltip | fit-content support May 25, 2022
@cetincakiroglu
Copy link
Contributor

Hi @rosenthalj,

Thanks for your report.
This is an enhancement request so I edited the issue topic.

Regards.

@cetincakiroglu cetincakiroglu linked a pull request May 25, 2022 that will close this issue
mertsincan added a commit that referenced this issue May 31, 2022
Fixed #11502 - Tooltip | fit-content support
@cetincakiroglu cetincakiroglu removed their assignment Jun 7, 2022
@cetincakiroglu cetincakiroglu self-assigned this Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants