primeng icon indicating copy to clipboard operation
primeng copied to clipboard

PrimeNG: Multiselect Template not working within a P-Column

Open Im-Harrison opened this issue 9 years ago • 1 comments

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 The bug im experiencing is as follows in the following control layout:

<P-Datatable> <P-Column> <ng-template></ng-template>// for header <ng-template PTemplate="filter"> <p-multiSelect [options]="cars" [(ngModel)]="selectedCars2" [panelStyle]="{minWidth:'12em'}"> <ng-template let-car pTemplate="item"> <img src="myUrl_Local.png" style="width:24px;display:inline-block;vertical-align:middle"/> <div style="font-size:14px;float:right;margin-top:4px">{{car.label}}</div> </ng-template> </p-multiselect> </ng-template> </P-Column> </P-Datatable>

When i use the above code - with the included component implementation, all i am receiving is the text for the car e.g.(Audi, BMW... etc.) And the image is not displayed in multi-select list. Additionally the [PanelStyle] stated in the documentation and example in PrimeNg's example components is not a valid attribute? The main issue here is that i need to display an Icon like "<i class=fa fa-play">" instead of the "". However for the example ive used i cant even replicate showing an image and text as shown in the PrimeNg examples...

Expected behavior Displays the same way shown in the PrimeNg example of cars.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior? The motivation is that this was stated as "Fixed in 4.2.0" however the custom templates is definitely not fixed from what i can see and I cant see why it wont work.

Please tell us about your environment: Windows 10, Using vs 2015 Pro.

  • Angular version: 2.0.X V 4.0

  • PrimeNG version: 4.2.1

  • Browser: Chrome - only testing in chrome

  • Language: Typescript

Reference: Bug #3682 https://github.com/primefaces/primeng/issues/3682

Im-Harrison avatar Oct 04 '17 16:10 Im-Harrison

p-dataTable is deprecated and will be removed in favor of the new p-table (aka TurboTable) of 5.1.0 so closing the issue. Please try the new p-table once 5.1.0 is released.

cagataycivici avatar Jan 13 '18 22:01 cagataycivici