The Pop up does not appear outside the boundaries when implementing column resizing in PrimeNG Table

I am currently integrating PrimeNG components into my Angular 5 project. On the landing page, I have specific requirements such as column resizing and filter pop-ups.

The pop-up displays correctly on the table without using the pResizableColumn class. However, when I apply the resize column class, the pop-up is confined to that header column only, hiding the rest of the content due to the relative positioning used by pResizableColumn.

I'm looking for a way to display the pop-up with the column resize functionality enabled. If anyone has any insights on this issue, please assist me.

The images below illustrate the situation:

Properly displayed pop-up

https://i.sstatic.net/M1T8Z.png

Pop-up hidden when the resize column feature is implemented

https://i.sstatic.net/5ByUc.png

file.html

                <div class="card-body" style="padding:0">
                    <div class="tab-content">
                        <div role="tabpanel" class="landing-table tab-pane active" id="all_cases">
                            <p-table (click)="hideFilterPopup()" (scroll)="hideFilterPopup()" #dt [columns]="cols" [value]="fetchCases" [totalRecords]="totalRecords"
                                [rows]="10" [(selection)]="selectedTableRow" [resizableColumns]="true" dataKey="ticketRef" (onRowSelect)="openDetailsAndView($event.data.ticketRef)"
                                [scrollable]="true" scrollHeight="350px" [style]="{width:'100%'}">
                                <ng-template pTemplate="colgroup" let-columns>
                                    <colgroup>
                                        <col style="width:30px">
                                        <col style="width:150px">
                                        <col *ngFor="let col of columns" style="width:150px">
                                    </colgroup>
                                </ng-template>
                                <ng-template pTemplate="header" let-columns let-fetchCases>
                                    <tr>
                                        <th style="width:30px"></th>
                                        <th id="case_reference" pResizableColumn>Ticket Reference
                                            <span class="lnr lnr-funnel"></span>
                                            <p-sortIcon [pSortableColumn]="fetchCases.ticketRef" [field]="fetchCases.ticketRef" ariaLabel="Activate to sort" ariaLabelDesc="Activate to sort in descending order"
                                                ariaLabelAsc="Activate to sort in ascending order"></p-sortIcon>
                                        </th>
                                        <th *ngFor="let col of columns" pResizableColumn>
                                            {{col.title}}
                                            <p-sortIcon [pSortableColumn]="col.mapper" [field]="col.mapper" ariaLabel="Activate to sort" ariaLabelDesc="Activate to sort in descending order"
                                                ariaLabelAsc="Activate to sort in ascending order"></p-sortIcon>

                                            <div class="inlineFilters" [ngClass]="selectedFilter === col.title ? 'displayBlock' : 'displayNone'">
                                                <div class="row marginZro">
                                                    <input class="col-sm-12 inlineInput" type="text" placeholder="Filter...">
                                                    <button class="col-sm-6 btn btn-stable">Search</button>
                                                    <button class="col-sm-6 btn btn-stable">Clear</button>
                                                </div>
                                            </div>
                                            <span class="lnr lnr-funnel" (click)="opeenFilter(col.title)"></span>
                                        </th>
                                    </tr> 
                                    </ng-template>
                                <ng-template pTemplate="body" let-fetchCases let-columns="columns">
                                    <tr [pSelectableRow]="fetchCases">
                                        <td style="width:30px">
                                            <p-tableCheckbox [value]="fetchCases"></p-tableCheckbox>
                                        </td>
                                        <td class="caseRefLink ui-resizable-column" (click)="openHandlingTab(fetchCases)">
                                            <div class="extentedNotes" title="{{fetchCases.ticketRef}}">{{fetchCases.ticketRef}}</div>
                                        </td>
                                        <td *ngFor="let col of columns" class="ui-resizable-column">
                                            <div class="extentedNotes" title="{{fetchCases[col.field]}}" [ngClass]="{'timeLeftCol':(col.mapper == 'timeLeft'),
                                                            'rag-status-green':(col.mapper == 'timeLeft' && fetchCases['rag'] == 'Green'),
                                                            'rag-status-red':(col.mapper == 'timeLeft' && fetchCases['rag'] == 'Red'),
                                                            'rag-status-yellow':(col.mapper == 'timeLeft' && fetchCases['rag'] == 'Amber')}">{{fetchCases[col.mapper]}}</div>
                                        </td>
                                    </tr>
                                </ng-template>
                            </p-table>
                        </div>
                    </div>
                    <p-paginator *ngIf="totalRecords > 10" [rows]="10" [totalRecords]="totalRecords" [first]="first" (onPageChange)="loadTicketDetailsLazy($event)"></p-paginator>
                </div<

component.ts

opeenFilter(selectedFilter){
    event.stopPropagation()
    if(this.selectedFilter == selectedFilter) {
      this.selectedFilter = "";
    }else {
      this.selectedFilter = selectedFilter;
    }
    
  }

  hideFilterPopup(){
    if(this.selectedFilter != ""){
      this.selectedFilter = "";
    }
  }

style.css

.inlineFilters {
    position: absolute;
    z-index: 2;
    padding: 5px;
    background: #EFEFEF;
    border-radius: 5px;
    max-width: 15%;
}

.inlineFilters .inlineInput {
    margin-bottom: 5px;
}
.inlineFilters button {
    padding: 0 !important;
}

Answer №1

Modify the placement of the inlineFilters class and substitute absolute with fixed :

.inlineFilters {
    position: fixed;
    z-index: 2;
    padding: 5px;
    background: #EFEFEF;
    border-radius: 5px;
    width: 188px;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the reason for the image not being positioned in the top left corner of the html page?

My simple HTML page consists of only one image: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Anz ...

A guide on leveraging the modal window function within Angular

I have a simple list of files with a "Delete" button. I have added a modal window for confirmation, but I am unsure how to connect the Delete function from the main component to the modal window. The modal window is implemented using the @angular/materia ...

Ensure that the Bootstrap 5 modal and backdrop are sized to fit the parent container's width and height rather than filling the entire screen

Is there a way to limit the size of a Bootstrap 5 modal dialog and backdrop? The example below occupies 100% of the screen, can it be adjusted to cover only the parent main container? <main class="container-fluid pt-4 px-4" style="height ...

2 column setup in the last row of a CSS grid

Can anyone help me troubleshoot an issue with aligning two buttons to the right in a form using CSS grid? I've attached a screenshot for reference. https://i.stack.imgur.com/DFGrx.png **css ** .wrapper { width:75%; padding-top: 15px; padd ...

Angular2 displays an error stating that the function start.endsWith is not recognized as a valid function

After switching my base URL from / to window.document.location, I encountered the following error message: TypeError: start.endsWith is not a function Has anyone else experienced this issue with [email protected]? ...

What could be causing the data inside the component to not display properly?

Consider this scenario where we have a component with input data: @Component({ selector: 'app-mail-list', templateUrl: './mail-list.component.html', styleUrls: ['./mail-list.component.scss']}); export class Ma ...

Take a break in between keyframe animations

I have a basic animation set up with keyframes. @-webkit-keyframes rotation { 0% { -webkit-transform: rotate(10deg); } 25% { -webkit-transform: rotate(5deg); } 50% { -webkit-transform: rotate(10deg); } 75% { -webkit-transform: ...

The Bootstrap button plugin appears to be malfunctioning and not applying its intended styling

Hello there, I've been trying to implement an option group in my application, following the example provided at Buttons :: Checkbox and Radio Buttons. However, I've encountered an issue where the styling does not seem to be applied correctly and ...

Is there a way to adjust the font color when the expiration date passes?

My goal is to change the color of text to green when the expiration date has not been reached yet. If the expiration date has passed, then the text should be red. .curentDate { color: rgb(54, 168, 54) } .expirationDate{ color: red; } <div cl ...

Challenges experienced during the process of uploading a website to the server

I seem to have encountered an issue where the Navigation background image is missing after uploading my website onto the server. Surprisingly, everything else seems to be working perfectly. What could possibly be the cause of this discrepancy? navbar-de ...

customizable path settings for sprites using css

Currently, I have a situation where I am using many sprites in my CSS file, and all the image locations are hardcoded within the CSS itself. Now, I am considering moving all these images to a CDN. The problem is that it's quite cumbersome to change th ...

Div sliding down from the top of the page

I have successfully created a pop up that appears when the user reaches the bottom of the page. Now, I am looking to implement a similar concept but have the pop up appear from the TOP of the page, at a specific location on the page instead of just top or ...

The arrangement of pictures on a card

I decided to tweak the original concept by placing the images inside a Bootstrap card. However, the end result is that the images appear to be floating. https://i.stack.imgur.com/Uf721.png Any suggestions on how to make them fit nicely within the card? ...

Angular encounters an issue with the message "Symbolic link could not be followed"

I am facing difficulties in building Angular (version 6) after upgrading node modules. The error message that I encounter is: Failed to capture fingerprint of output files for task ':pbr-angular-common:setupAngular' property '$1' d ...

Ionic2: expanding menu options in the sidemenu

I'm not very familiar with ionic, but I have a question on behalf of my friend who is hesitant to ask on StackOverflow because she's unsure of how to frame her question. She simply wants to learn how to implement a submenu in an ionic 2 side men ...

What is the best way to combine routes from various modules?

app.module.ts ... imports: [ BrowserModule, AppRoutingModule, FormsModule, ReactiveFormsModule, HttpClientModule, RecipesModule ], ... app-routing.module.ts ... const routes: Routes = [ {path: '', redirectTo: &ap ...

Displaying a <div> element within a :before pseudoelement

Implementing the use of :before to insert an icon font into a div for a CSS3 hover state. I am looking to incorporate a div within the <a> tag in order for both elements to function as links: <a href="#set-4" class="column product hi-icon product ...

HTML CSS margins are used to create white spaces at the edges of a webpage

My website is displaying white spaces on the edge and I want it to look seamless like this: Does anyone know where I went wrong? ...

Center the background image at the halfway mark on the screen

Can someone help me figure out how to position an image so that it appears exactly at the halfway point of the screen? I've researched different ways to position images within a div, but I'm struggling with positioning it on the entire screen. ...

When employing a mask in Angular, the value directive does not hold any binding

<input type="text" class="form-control" [value]="phoneVariable" mask="000-000-0000"/> The use of mask in the input tag is causing issues with the functionality of [value] in Angular. For instance, if phoneVar ...