-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Turbo Table global filter issue #4892
Comments
I am getting same problem.
Edit: |
It is confusing, was having the same issue. You need to define the column dictionary and assign to [columns] on the p-table like the example. The global filter uses this.columns to figure out the columns to filter on. Without that defined will get that error. |
@bias-keenly you are right. I've just created table dynamically and it works. both global and normal filtering works when table is created dynamically. When I tried to add cols to the manually created table, it didn't throw the previous error but filtering didnt work right... |
Maybe related to this #4885 For a temp workaround I set [lazy]="false" |
Tracked at #4908 |
I ran into a similar issue, but resolve it by setting appropriate field and add to template body. Global filtering works if you set [columns]="cols" where Only col1-field is searchable. You need to specify "columns" in your pTemplate="body". For example, |
The global filter throws error on input.
Throws length of undefined error in line 575 in the component js file.
My table template is:
<p-table #dt [value]="rows" reorderableColumns="true" scrollable="true" scrollHeight="700px">
<input type="text" pInputText size="70" placeholder="{{'companies.management.Search' | translate}}" (input)="dt.filterGlobal($event.target.value, 'contains')" style="width:auto">
<button pButton type="button" *ngIf="canManageCompanies" class="ui-button-secondary" (click)="newCompany(company)" icon="fa-plus-square-o" label=" {{'companies.management.NewCompany' | translate}}" style="float:right">
{{'companies.management.Name' | translate}}
{{'companies.management.Users' | translate}}
<tr [pSelectableRow]="company">
{{company.id}}
{{company.name}}
{{company.applicationUsers}}
<button type="button" pButton (click)="editCompany(company)" class="ui-button-secondary" icon="fa-pencil-square-o" label="{{'companies.management.Edit' | translate}}">
<button type="button" pButton (click)="deleteCompany(company)" class="ui-button-secondary" icon="fa-trash-o" label="{{'companies.management.Delete' | translate}}">
(Count: {{rowCount}})
The text was updated successfully, but these errors were encountered: