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

Overlay Panel / Confirm Popup The arrow shows wrong #8750

Closed
AlbaSS18 opened this issue Apr 17, 2020 · 2 comments
Closed

Overlay Panel / Confirm Popup The arrow shows wrong #8750

AlbaSS18 opened this issue Apr 17, 2020 · 2 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@AlbaSS18
Copy link

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

Current behavior

I have a p-table and I am using a p-overlaypanel to filter. The problem is that the overlaypanel shows the arrow wrong.The arrow appears on the right and I want it to appear on the left. See the image

In this image, the overlaypanel must be associated with the row called username.

This is my code HTML of span

 <span class="filter-button" *ngIf="col.filter">
              <p-button id={{col.field}} styleClass="no-bg-button" icon="fas fa-filter"
                [style]="{'padding':0, 'width': '20px', 'height': '20px'}" (click)="filter($event, col.field)">
              </p-button>
   </span>

And this is the code of overlay:

<p-overlayPanel #filterOverlay id="overlay">
  <input [(ngModel)]="filterInput" pInputText type="text"
    (input)="incTable.filter($event.target.value, filterField, 'contains')" placeholder=""/>
 </p-overlayPanel>

And this is my code in javascript:

filter(event: Event, field: string) {
  event.preventDefault();
  event.stopPropagation();

  this._incTable.reset();
  this.filterField = field;
  this.filterInput = '';
  this.filterOverlay.toggle(event);
}

When I click in the span, the overlaypanel appears. The solution of setting a width to the table or changing the css doesn't work for me. Any solution?

Please tell us about your environment:

  • Angular version: 8.2.14
  • PrimeNG version: 8.1.1
  • Browser: Firefox 74.0
  • Language: TypeScript
@Xakaloz
Copy link

Xakaloz commented Apr 20, 2020

Hi,
I "fixed" that by adjusting the ::after and ::before elements' margin attributes :

.ui-overlaypanel {
    &.ui-overlaypanel-shifted {    
        &::after {
            margin-right: 15px !important;
        }
    
        &::before {
            margin-right: 13px !important;
        }
    }

    &::after {
        margin-left: 0px !important;
    }
    
    &::before {
        margin-left: -2px !important;
    }
} 

This is not the ideal solution, but it works.

@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Nov 23, 2020
@cagataycivici cagataycivici added this to the 11.0.0-rc.2 milestone Nov 23, 2020
@Olmer1st
Copy link

I have the same problem, it happens with large screens (angular 11, primeng 11)
image
image

Looks like a problem in align() function, when you add flipped class , especially when the target located on right side of the screen.

@cagataycivici cagataycivici changed the title Overlay Panel: The arrow shows wrong Overlay Panel / Confirm Popup The arrow shows wrong Nov 30, 2020
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

No branches or pull requests

5 participants