Skip to content

Commit

Permalink
fixed #3142
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtcndkn committed Jun 19, 2017
1 parent 31dbddc commit 08c89fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/components/common/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class Column implements AfterContentInit{
@Input() expander: boolean;
@Input() selectionMode: string;
@Input() filterPlaceholder: string;
@Input() filterMaxlength: number;
@Input() frozen: boolean;
@Output() sortFunction: EventEmitter<any> = new EventEmitter();
@ContentChildren(PrimeTemplate) templates: QueryList<any>;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/datatable/datatable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class RowExpansionLoader {
</span>
<span class="ui-sortable-column-icon fa fa-fw fa-sort" *ngIf="col.sortable"
[ngClass]="{'fa-sort-desc': (dt.getSortOrder(col) == -1),'fa-sort-asc': (dt.getSortOrder(col) == 1)}"></span>
<input [attr.type]="col.filterType" class="ui-column-filter ui-inputtext ui-widget ui-state-default ui-corner-all" [attr.placeholder]="col.filterPlaceholder" *ngIf="col.filter&&!col.filterTemplate" [value]="dt.filters[col.field] ? dt.filters[col.field].value : ''"
<input [attr.type]="col.filterType" class="ui-column-filter ui-inputtext ui-widget ui-state-default ui-corner-all" [attr.maxlength]="col.filterMaxlength" [attr.placeholder]="col.filterPlaceholder" *ngIf="col.filter&&!col.filterTemplate" [value]="dt.filters[col.field] ? dt.filters[col.field].value : ''"
(click)="dt.onFilterInputClick($event)" (keyup)="dt.onFilterKeyup($event.target.value, col.field, col.filterMatchMode)"/>
<p-columnFilterTemplateLoader [column]="col" *ngIf="col.filterTemplate"></p-columnFilterTemplateLoader>
<p-dtCheckbox *ngIf="col.selectionMode=='multiple'" (onChange)="dt.toggleRowsWithCheckbox($event)" [checked]="dt.allSelected" [disabled]="dt.isEmpty()"></p-dtCheckbox>
Expand Down
6 changes: 6 additions & 0 deletions src/app/showcase/components/datatable/datatabledemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ <h3>Properties</h3>
<td>null</td>
<td>Defines placeholder of the input fields.</td>
</tr>
<tr>
<td>filterMaxlength</td>
<td>number</td>
<td>null</td>
<td>Specifies the maximum number of characters allowed in the filter element.</td>
</tr>
<tr>
<td>rowspan</td>
<td>string</td>
Expand Down

0 comments on commit 08c89fc

Please sign in to comment.