primeng

How to call angular function when click p-dialog close(X) button?

。_饼干妹妹 提交于 2019-12-10 21:16:09
问题 How to call angular function when click p-dialog close(X) button? I have searched and just tried this (onHide)="cancel()" . But it's not working. Kindly share your solutions. I know we can use a close/cancel button to hide the popup. But in my scenario I want to call an event when clicking the (X) button click. 回答1: Actually (onHide)="cancel()" works fine according to this Plunkr. 回答2: Try: (click)="cancel()" instead. I had the same error but I solved it by using the click method. Grettings :

Angular 2 Nested Modal Dialog with PrimeNG doesn't work

强颜欢笑 提交于 2019-12-10 18:21:23
问题 I am using the PrimeNG dialog component and I have a modal dialog from which, on the click of a button, I want to show another modal dialog. What is happening is that my second modal dialog is not really modal, because I only see the content of the dialog following the button. I do change [appendTo] attribute of the p-dialog for the second modal dialog but it does not seem to work properly. How can I open nested dialog in a p-dialog? Dialog in a angular 2 component: <p-dialog header="Create

Fixed header in primeng DataTable

走远了吗. 提交于 2019-12-10 17:54:10
问题 I'm using PrimeNG 4.1.0-rc.2 . What I'm trying to create is datatable with fixed header. Header should be always visible even if I scroll my table to the bottom (like fixed menu on the top of stackoverflow). I tried scrollable and scrollHeight properties of p-dataTable but there is a scroll on the table side. I don't need it because I already have one for entire page. Also I tried to fix it with position: fixed but then table headers and table contents have a different size. Any help would be

flex grid not working for p-col-# primeng Angular 5

荒凉一梦 提交于 2019-12-10 17:29:33
问题 i am using primeNG for angular https://www.primefaces.org/primeng/#/flexgrid when i am trying this <div class="p-grid"> <div class="p-col-6"> <div class="box">6 </div> </div> <div class="p-col-6"> <div class="box">6 </div> </div> </div> the boxs are on top of each other and not next to each other i run npm install primeflex --save and added "node_modules/primeflex/primeflex.css" to angular.json seems to be some thing related to the primeflex.css the p-col class is working fine but the p-col-#

Primeng schedule with Angular2 webpack

倖福魔咒の 提交于 2019-12-10 15:56:41
问题 I'm going to use Primeng schedule (http://www.primefaces.org/primeng/#/schedule) within a project based on Angular2 webpack starter(https://github.com/AngularClass/angular2-webpack-starter). Since Primeng schedule depends on fullcalendar.js which is a jQuery plugin, I try to load fullcalendar and jQuery through webpack. I follow example at here (https://github.com/cagataycivici/angular2-webpack-starter). In package.json , I added settings below to "devDependencies" "fullcalendar": "^2.7.2",

Primeng DataTable Dropdown doesn't work with options via column

♀尐吖头ヾ 提交于 2019-12-10 11:32:22
问题 I'm making a re-usable table component for my application based on DataTable from PrimeNG. My component has the following html code: <p-dataTable [value]="cars" [rows]="5" [paginator]="true" [globalFilter]="gb" [(selection)]="selectedValue" (onRowSelect)="onRowSelect($event)" #dt> <p-column *ngIf="hasSelectCheckbox" [style]="{'width':'38px'}" selectionMode="single"></p-column> <p-column *ngIf="hasExpander" expander="true" styleClass="col-icon"></p-column> <p-column *ngFor="let col of cols"

How to make a single Primeng DataTable row editable on a button click using in Angular 2

送分小仙女□ 提交于 2019-12-10 10:30:56
问题 I am trying to use DataTable from Primeng in Angular 2. I am displaying set of rows in datatable having a column for Edit button. On click of edit button of any row, all fields of that row should be editable. HTML: <p-dataTable [value]="testcases" [(selection)]="selectedTestCases" dataKey="ModuleID" [editable]="true" sortMode="multiple"> <p-column [style]="{'width':'10 px'}" selectionMode="multiple"></p-column> <p-column field="ModuleID" [editable]="isEditable" header="ModuleID"></p-column>

PrimeNg DropDown - User can't clear the value

Deadly 提交于 2019-12-10 08:12:46
问题 I'm implementing primeNg dropdown component in my Angular2 application. <p-dropdown [options]="listCustomers_itm" placeholder="Selezionare" [(ngModel)]="Customer_itm" [ngModelOptions]="{standalone: true}" [style]="{'width':'225px'}" filter="filter" (onChange)="onCustomerSelect($event.value)"> </p-dropdown> All works fine except one annoing thing: Once time the user has selected an option, he can't clear the selected value ... Can you help me? 回答1: To fix this, I had to set a placeholder for

ERROR Missing number at position 0 when using setValue angular 4

别来无恙 提交于 2019-12-10 02:13:47
问题 I'm using Angular 4 with reactiveforms, momentjs, and primeng calendar I'm tying to use setValue and have tried patchValue on a reactiveForm field which contains a Date. This date has been created via a primeng calendar. purchaseDate: Sat Sep 02 2017 00:00:00 GMT+0100 (GMT Daylight Time) I use this 'date' to do a couple of things and then onSumbit of the form I convert the date using momentjs to a clean format ready for the backend to accept (i.e. YYYY.MM.DD) using .moment().format(....

prime-ng create custom filter for column filed set outside of data table in angular 4

强颜欢笑 提交于 2019-12-09 13:42:31
问题 when I have clicked on button then data table particular column set the filter value.when I have clicked on CARG button then apply that value on the symbol column. when clear the value its show all records. 回答1: Solved.. using dt.filter(value,field, matchMode); .html <div class="ui-widget-header nopadding"> <label *ngFor="let filterRow of Symbols_Array;let l=index;"> <button (click)="dt.reset(); ColumnFilter(dt,filterRow.label,'symbol','')" pButton type="button" [style]="{'text-transform':