primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Calendar slow render with datatable

Open igogu opened this issue 9 years ago • 3 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

when a p-datatable has the p-calendar component in his row, its only needed 5-6 row for making the page slow and the calendar rendering lates like 1 second to respond to the click,

Expected behavior Instant render after calendar clicked aswell the other components in the page

Minimal reproduction of the problem with instructions

<p-dataTable [value]="listado | async" [globalFilter]="gb" 
.....">    
    <p-column *ngFor="let col of colus" [field]="col.field"....>

		<template let-row="rowData" let-ri="rowIndex" pTemplate>
			...
			<div *ngIf="col.fieldtype=='date'">
			 	<p-calendar [ngModel]="value | date: 'dd/MM/yyyy'" [locale]="es" dateFormat="dd/mm/yy" [monthNavigator]="true"
			  		[yearNavigator]="true" (ngModelChange)="value=$event">
			  	</p-calendar>

You can see here how is rendering 2 calendars at the same time because when you change de focus the last calendar doesnt stop rendering instantly.

image

image

What is the motivation / use case for changing the behavior? It's a big problem, because with calendar component in the datatable the interaction page is so slow

Please tell us about your environment: SO: Ubuntu 16.04 ls, IDE: eclipse neon,

  • PrimeNG version: 2.0.5

  • Browser: [all | Chrome | Firefox -->

igogu avatar Mar 28 '17 16:03 igogu

I have the same problem with Calendar component.

juanravg avatar Mar 29 '17 08:03 juanravg

It's fixed with angular 4 and primeng 4.0.0 rc2

igogu avatar Mar 29 '17 15:03 igogu

This should be fixed in recent PrimeNG release, please try with it and if the issue persists drop a comment with along with a test case based on plunkr below and we'll review again.

http://plnkr.co/edit/Wj39h1?p=preview

cagataycivici avatar Jun 22 '17 11:06 cagataycivici