Tooltip | fit-content support #11502
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
I'm submitting a ... (check one with "x")
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.
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:
-- removed most of the data and removed the second filter table example
To reproduce the problem:
-- https://primeng-tablefilter-demo-jdhm7o.stackblitz.io
-- The tooltips will look correct
-- 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
The text was updated successfully, but these errors were encountered: