Hi Shamil,
Thank you for contacting Syncfusion support.
We have analyzed your reported issue and we found that you have rendered colorpicker for each item in the listview template. Generally, listview will relatively faster for high data load pressure but in your case the slow is due to the colorpicker component and its popups’ elements.
When we render a colorpicker component, it creates a button and dropdown popup element for its behavior. When we render colorpicker inside each item of listview, it will create for each item x 2 button element and dropdown popup elements. Even though this itself will slow down the process, the real slow is on scrolling the listview. When we scroll listview items the each colorpicker popup element will update its position for each of its target element (inspect and check in developer tools). This is CPU heavy task, hence the slow down occurs.
We can approach this issue in two ways, (1) keeping only one colorpicker for all the listview item entirely isolated from listview or (2) we can render colorpicker on demand using EJ2 tooltip component.
We have attached a sample using 2nd method. Basically we will render listview in template with button. On button click event we will open a tooltip for that button. Inside tooltip on afterOpen event (from tooltip event) we will initialize the colorpicker component. Thus we can keep performance and only one colorpicker at a time.
Please get back to us for further assistance.
Thanks,
Christo
Hi Christopher,
I went through your code and changes done in my project. But I'm getting error as below, (Compiled successfully)
-- Browser console log --
ERROR Error: Uncaught (in promise): Error: Template parse errors:
Can't bind to 'showTipPointer' since it isn't a known property of 'ejs-tooltip'.
1. If 'ejs-tooltip' is an Angular component and it has 'showTipPointer' input, then verify that it is part of this module.
2. If 'ejs-tooltip' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("nsOn="Custom" (afterOpen)="afterTooltipOpen($event)"
(afterClose)="afterClose($event)" [ERROR ->][showTipPointer]="showTipPointer">
<ejs-listview #selectedListView id="selected-data-lis"): ng:///DataServicesModule/ReviewEditComponent.html@67:46
'ejs-tooltip' is not a known element:
1. If 'ejs-tooltip' is an Angular component, then verify that it is part of this module.
2. If 'ejs-tooltip' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
-- Imports --
import { ListViewComponent, SelectEventArgs } from '@syncfusion/ej2-ng-lists';
import { TooltipComponent } from '@syncfusion/ej2-angular-popups';
import { closest } from '@syncfusion/ej2-base';
import { ColorPicker, ColorPickerEventArgs } from '@syncfusion/ej2-inputs';
Note: '@syncfusion/ej2-angular-lists' not supported in my project. I used '@syncfusion/ej2-ng-lists' instead of that.