@syncfusion/ej2-schedule 32.1.20 → 32.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 32.1.20
3
+ * version : 32.1.22
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-schedule",
3
- "version": "32.1.20",
3
+ "version": "32.1.22",
4
4
  "author": "Syncfusion Inc.",
5
5
  "license": "SEE LICENSE IN license",
6
6
  "main": "./dist/ej2-schedule.umd.min.js",
@@ -8,12 +8,12 @@
8
8
  "es2015": "./dist/es6/ej2-schedule.es5.js",
9
9
  "dependencies": {
10
10
  "@syncfusion/ej2-base": "~32.1.19",
11
- "@syncfusion/ej2-buttons": "~32.1.19",
12
- "@syncfusion/ej2-calendars": "~32.1.20",
11
+ "@syncfusion/ej2-buttons": "~32.1.21",
12
+ "@syncfusion/ej2-calendars": "~32.1.22",
13
13
  "@syncfusion/ej2-data": "~32.1.19",
14
- "@syncfusion/ej2-dropdowns": "~32.1.20",
14
+ "@syncfusion/ej2-dropdowns": "~32.1.22",
15
15
  "@syncfusion/ej2-excel-export": "~32.1.19",
16
- "@syncfusion/ej2-inputs": "~32.1.20",
16
+ "@syncfusion/ej2-inputs": "~32.1.22",
17
17
  "@syncfusion/ej2-lists": "~32.1.19",
18
18
  "@syncfusion/ej2-navigations": "~32.1.19",
19
19
  "@syncfusion/ej2-popups": "~32.1.19"
@@ -892,10 +892,13 @@ var ResourceBase = /** @class */ (function () {
892
892
  if (isNullOrUndefined(groupOrder) && this.parent.activeViewOptions.group.allowGroupEdit && resource.allowMultiple) {
893
893
  return undefined;
894
894
  }
895
- var id = isNullOrUndefined(groupOrder) ? eventObj[resource.field] : groupOrder[parseInt(colorFieldIndex.toString(), 10)];
896
- var data = this.filterData(resource.dataSource, resource.idField, id);
897
- if (data.length > 0) {
898
- return data[0][resource.colorField];
895
+ var isResourceEmpty = this.parent.isResourceCollectionEmpty();
896
+ if (!isResourceEmpty) {
897
+ var id = isNullOrUndefined(groupOrder) ? eventObj[resource.field] : groupOrder[parseInt(colorFieldIndex.toString(), 10)];
898
+ var data = this.filterData(resource.dataSource, resource.idField, id);
899
+ if (data.length > 0) {
900
+ return data[0][resource.colorField];
901
+ }
899
902
  }
900
903
  return undefined;
901
904
  };
@@ -450,6 +450,28 @@ export interface ScheduleModel extends ComponentModel{
450
450
  */
451
451
  showQuickInfo?: boolean;
452
452
 
453
+ /**
454
+ * Indicates whether the editor window and quick dialog popups are created and rendered in the DOM by default.
455
+ *
456
+ * When set to `true`, the popups are created during Scheduler initialization and reused throughout
457
+ * the component's lifetime. When set to `false`, the popups are created on demand when opened and
458
+ * destroyed when closed, reducing initial load but adding per-open creation cost.
459
+ *
460
+ * @remarks
461
+ * - Use `true` to minimize runtime allocations during interactions at the cost of higher initial setup.
462
+ * - Use `false` to reduce initial render cost and memory footprint when popups are infrequently used.
463
+ * - Toggling from `false` to `true` will keep subsequently created popups alive for reuse.
464
+ * *
465
+ * @example
466
+ * // Configure the editor to defer default popup creation.
467
+ * const options: ScheduleOptions= {
468
+ * prerenderDialogs: false
469
+ * };
470
+ *
471
+ * @default true
472
+ */
473
+ prerenderDialogs?: boolean;
474
+
453
475
  /**
454
476
  * This property helps user to add/edit the event in inline. By default, it is set to `false`.
455
477
  *
@@ -546,6 +546,27 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
546
546
  * @default true
547
547
  */
548
548
  showQuickInfo: boolean;
549
+ /**
550
+ * Indicates whether the editor window and quick dialog popups are created and rendered in the DOM by default.
551
+ *
552
+ * When set to `true`, the popups are created during Scheduler initialization and reused throughout
553
+ * the component's lifetime. When set to `false`, the popups are created on demand when opened and
554
+ * destroyed when closed, reducing initial load but adding per-open creation cost.
555
+ *
556
+ * @remarks
557
+ * - Use `true` to minimize runtime allocations during interactions at the cost of higher initial setup.
558
+ * - Use `false` to reduce initial render cost and memory footprint when popups are infrequently used.
559
+ * - Toggling from `false` to `true` will keep subsequently created popups alive for reuse.
560
+ * *
561
+ * @example
562
+ * // Configure the editor to defer default popup creation.
563
+ * const options: ScheduleOptions= {
564
+ * prerenderDialogs: false
565
+ * };
566
+ *
567
+ * @default true
568
+ */
569
+ prerenderDialogs: boolean;
549
570
  /**
550
571
  * This property helps user to add/edit the event in inline. By default, it is set to `false`.
551
572
  *
@@ -1045,6 +1066,13 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
1045
1066
  private validateDate;
1046
1067
  private getViewIndex;
1047
1068
  private setViewOptions;
1069
+ /**
1070
+ * Checks if resources have empty dataSource
1071
+ *
1072
+ * @returns {boolean} Returns true if resources have empty dataSource, otherwise false
1073
+ * @private
1074
+ */
1075
+ isResourceCollectionEmpty(): boolean;
1048
1076
  private getActiveViewOptions;
1049
1077
  private initializeDataModule;
1050
1078
  private setEditorTitles;
@@ -366,6 +366,19 @@ var Schedule = /** @class */ (function (_super) {
366
366
  (currentIndex === -1) ? 0 : currentIndex;
367
367
  }
368
368
  };
369
+ /**
370
+ * Checks if resources have empty dataSource
371
+ *
372
+ * @returns {boolean} Returns true if resources have empty dataSource, otherwise false
373
+ * @private
374
+ */
375
+ Schedule.prototype.isResourceCollectionEmpty = function () {
376
+ return this.resourceCollection.length > 0 &&
377
+ this.resourceCollection.some(function (res) {
378
+ var ds = res && res.dataSource;
379
+ return Array.isArray(ds) ? ds.length === 0 : !ds;
380
+ });
381
+ };
369
382
  Schedule.prototype.getActiveViewOptions = function () {
370
383
  var timeScale = {
371
384
  enable: this.timeScale.enable,
@@ -374,12 +387,20 @@ var Schedule = /** @class */ (function (_super) {
374
387
  majorSlotTemplate: this.timeScale.majorSlotTemplate,
375
388
  minorSlotTemplate: this.timeScale.minorSlotTemplate
376
389
  };
390
+ var isResourceEmpty = this.isResourceCollectionEmpty();
377
391
  var isYearView = this.viewCollections[this.viewIndex].option.indexOf('Year') > -1;
392
+ var groupResources = [];
393
+ if ((!isNullOrUndefined(this.group.resources) && this.group.resources.length > 0) && !isResourceEmpty) {
394
+ groupResources = this.group.resources;
395
+ }
396
+ else if (this.resources.length > 0 && !isResourceEmpty) {
397
+ groupResources = [];
398
+ }
378
399
  var group = {
379
- byDate: isYearView ? false : this.group.byDate,
400
+ byDate: (isYearView || isResourceEmpty) ? false : this.group.byDate,
380
401
  byGroupID: this.group.byGroupID,
381
402
  allowGroupEdit: this.group.allowGroupEdit,
382
- resources: isNullOrUndefined(this.group.resources) ? [] : this.group.resources,
403
+ resources: groupResources,
383
404
  headerTooltipTemplate: this.group.headerTooltipTemplate,
384
405
  enableCompactView: this.group.enableCompactView,
385
406
  hideNonWorkingDays: ['Day', 'Week', 'WorkWeek', 'Month'].indexOf(this.currentView) > -1 ? this.group.hideNonWorkingDays : false
@@ -894,7 +915,7 @@ var Schedule = /** @class */ (function (_super) {
894
915
  * @private
895
916
  */
896
917
  Schedule.prototype.removeSelectedClass = function () {
897
- var selectedCells = this.getSelectedCells();
918
+ var selectedCells = [].slice.call(this.element.querySelectorAll('.' + cls.SELECTED_CELL_CLASS));
898
919
  for (var _i = 0, selectedCells_1 = selectedCells; _i < selectedCells_1.length; _i++) {
899
920
  var cell = selectedCells_1[_i];
900
921
  cell.removeAttribute('tabindex');
@@ -1327,7 +1348,23 @@ var Schedule = /** @class */ (function (_super) {
1327
1348
  * @private
1328
1349
  */
1329
1350
  Schedule.prototype.getSelectedCells = function () {
1330
- return [].slice.call(this.element.querySelectorAll('.' + cls.SELECTED_CELL_CLASS));
1351
+ var selectedCells = [].slice.call(this.element.querySelectorAll('.' + cls.SELECTED_CELL_CLASS));
1352
+ if (!selectedCells || selectedCells.length === 0) {
1353
+ return [];
1354
+ }
1355
+ else if (selectedCells.length === 1) {
1356
+ return selectedCells;
1357
+ }
1358
+ if (selectedCells && selectedCells.length > 1) {
1359
+ var hasAnyWorkCells = selectedCells.some(function (cell) { return cell.classList.contains(cls.WORK_CELLS_CLASS); });
1360
+ var workCells = hasAnyWorkCells ?
1361
+ selectedCells.filter(function (cell) { return !cell.classList.contains(cls.ALLDAY_CELLS_CLASS); }) : selectedCells;
1362
+ if (!workCells || workCells.length === 0) {
1363
+ return [];
1364
+ }
1365
+ return workCells.slice().sort(function (a, b) { return (+a.dataset.date || 0) - (+b.dataset.date || 0); });
1366
+ }
1367
+ return selectedCells;
1331
1368
  };
1332
1369
  /**
1333
1370
  * Method to generate the announcement string
@@ -1526,6 +1563,17 @@ var Schedule = /** @class */ (function (_super) {
1526
1563
  state.isLayout = true;
1527
1564
  }
1528
1565
  break;
1566
+ case 'prerenderDialogs': {
1567
+ if (newProp.prerenderDialogs) {
1568
+ this.eventWindow.renderEventWindow();
1569
+ this.quickPopup.renderQuickDialog();
1570
+ }
1571
+ else {
1572
+ this.eventWindow.destroy(true);
1573
+ this.quickPopup.destroyQuickDialog();
1574
+ }
1575
+ break;
1576
+ }
1529
1577
  case 'showWeekend':
1530
1578
  case 'startHour':
1531
1579
  case 'endHour':
@@ -2835,6 +2883,9 @@ var Schedule = /** @class */ (function (_super) {
2835
2883
  */
2836
2884
  Schedule.prototype.openOverlapAlert = function (args) {
2837
2885
  var _this = this;
2886
+ if (!this.prerenderDialogs) {
2887
+ return;
2888
+ }
2838
2889
  if (this.quickPopup) {
2839
2890
  var eventProp = {
2840
2891
  type: 'OverlapAlert',
@@ -2858,6 +2909,9 @@ var Schedule = /** @class */ (function (_super) {
2858
2909
  */
2859
2910
  Schedule.prototype.closeOverlapAlert = function () {
2860
2911
  var _this = this;
2912
+ if (!this.prerenderDialogs) {
2913
+ return;
2914
+ }
2861
2915
  if (this.quickPopup) {
2862
2916
  var args = {
2863
2917
  type: 'OverlapAlert',
@@ -3169,6 +3223,9 @@ var Schedule = /** @class */ (function (_super) {
3169
3223
  __decorate([
3170
3224
  Property(true)
3171
3225
  ], Schedule.prototype, "showQuickInfo", void 0);
3226
+ __decorate([
3227
+ Property(true)
3228
+ ], Schedule.prototype, "prerenderDialogs", void 0);
3172
3229
  __decorate([
3173
3230
  Property(false)
3174
3231
  ], Schedule.prototype, "allowInline", void 0);
@@ -28,7 +28,7 @@ export declare class EventWindow {
28
28
  private isEnterKey;
29
29
  private dialogEvent;
30
30
  constructor(parent: Schedule);
31
- private renderEventWindow;
31
+ renderEventWindow(): void;
32
32
  private renderDialogButtons;
33
33
  private addEventHandlers;
34
34
  refresh(): void;
@@ -27,7 +27,9 @@ var EventWindow = /** @class */ (function () {
27
27
  this.l10n = this.parent.localeObj;
28
28
  this.fields = this.parent.eventFields;
29
29
  this.eventWindowTime = { startTime: new Date(), endTime: new Date() };
30
- this.renderEventWindow();
30
+ if (this.parent.prerenderDialogs) {
31
+ this.renderEventWindow();
32
+ }
31
33
  }
32
34
  EventWindow.prototype.renderEventWindow = function () {
33
35
  this.element = createElement('div', { id: this.parent.element.id + '_dialog_wrapper' });
@@ -115,6 +117,9 @@ var EventWindow = /** @class */ (function () {
115
117
  }
116
118
  };
117
119
  EventWindow.prototype.openEditor = function (data, type, isEventData, repeatType) {
120
+ if (!this.parent.prerenderDialogs) {
121
+ this.renderEventWindow();
122
+ }
118
123
  this.parent.currentAction = type;
119
124
  this.parent.removeNewEventElement();
120
125
  if (this.parent.quickPopup) {
@@ -303,6 +308,9 @@ var EventWindow = /** @class */ (function () {
303
308
  }
304
309
  callBackPromise.resolve(args);
305
310
  });
311
+ if (!this.parent.prerenderDialogs && args.cancel) {
312
+ this.destroy(true);
313
+ }
306
314
  return callBackPromise;
307
315
  };
308
316
  EventWindow.prototype.onBeforeClose = function (args) {
@@ -330,6 +338,9 @@ var EventWindow = /** @class */ (function () {
330
338
  _this.resetForm();
331
339
  _this.parent.eventBase.focusElement(true);
332
340
  _this.eventCrudData = null;
341
+ if (!_this.parent.prerenderDialogs) {
342
+ _this.destroy(true);
343
+ }
333
344
  }
334
345
  }
335
346
  callBackPromise.resolve(args);
@@ -426,7 +437,8 @@ var EventWindow = /** @class */ (function () {
426
437
  else {
427
438
  this.createRecurrenceEditor(parentDiv);
428
439
  }
429
- if (this.parent.resourceCollection.length > 0) {
440
+ var isResourceEmpty = this.parent.isResourceCollectionEmpty();
441
+ if (this.parent.resourceCollection.length > 0 && !isResourceEmpty) {
430
442
  var resourceParentDiv = this.createDivElement(cls.EVENT_WINDOW_RESOURCES_DIV_CLASS);
431
443
  for (var _i = 0, _a = this.parent.resourceBase.resourceCollection; _i < _a.length; _i++) {
432
444
  var resource = _a[_i];
@@ -971,7 +983,8 @@ var EventWindow = /** @class */ (function () {
971
983
  if (cellsData.RecurrenceRule) {
972
984
  eventObj[this.fields.recurrenceRule] = cellsData.RecurrenceRule;
973
985
  }
974
- if (this.parent.resourceCollection.length > 0 || this.parent.activeViewOptions.group.resources.length > 0) {
986
+ var isResourceEmpty = this.parent.isResourceCollectionEmpty();
987
+ if ((this.parent.resourceCollection.length > 0 && !isResourceEmpty) || this.parent.activeViewOptions.group.resources.length > 0) {
975
988
  this.parent.resourceBase.setResourceValues(eventObj);
976
989
  }
977
990
  };
@@ -1580,7 +1593,7 @@ var EventWindow = /** @class */ (function () {
1580
1593
  if (endDate.getTime() >= new Date(+startDate).setMonth(startDate.getMonth() + interval)) {
1581
1594
  alertMessage = 'createError';
1582
1595
  }
1583
- if (isNullOrUndefined(alertMessage)) {
1596
+ if (isNullOrUndefined(alertMessage) && !isNullOrUndefined(this.parent.quickPopup.quickDialog)) {
1584
1597
  this.parent.quickPopup.quickDialog.hide();
1585
1598
  }
1586
1599
  }
@@ -19,7 +19,7 @@ export declare class QuickPopups {
19
19
  private render;
20
20
  private renderQuickPopup;
21
21
  private renderMorePopup;
22
- private renderQuickDialog;
22
+ renderQuickDialog(): void;
23
23
  private renderButton;
24
24
  private quickDialogClass;
25
25
  private applyFormValidation;
@@ -71,7 +71,7 @@ export declare class QuickPopups {
71
71
  refreshQuickDialog(): void;
72
72
  refreshQuickPopup(): void;
73
73
  refreshMorePopup(): void;
74
- private destroyQuickDialog;
74
+ destroyQuickDialog(): void;
75
75
  private destroyQuickPopup;
76
76
  private destroyMorePopup;
77
77
  destroy(): void;
@@ -25,7 +25,9 @@ var QuickPopups = /** @class */ (function () {
25
25
  QuickPopups.prototype.render = function () {
26
26
  this.renderQuickPopup();
27
27
  this.renderMorePopup();
28
- this.renderQuickDialog();
28
+ if (this.parent.prerenderDialogs) {
29
+ this.renderQuickDialog();
30
+ }
29
31
  };
30
32
  QuickPopups.prototype.renderQuickPopup = function () {
31
33
  var quickPopupWrapper = createElement('div', { className: cls.POPUP_WRAPPER_CLASS + ' e-popup-close', attrs: { role: 'dialog' } });
@@ -185,6 +187,9 @@ var QuickPopups = /** @class */ (function () {
185
187
  this.fieldValidator.renderFormValidator(form, rules, this.quickPopup.element, this.parent.locale);
186
188
  };
187
189
  QuickPopups.prototype.openRecurrenceAlert = function () {
190
+ if (!this.parent.prerenderDialogs) {
191
+ this.renderQuickDialog();
192
+ }
188
193
  var editDeleteOnly = this.quickDialog.element.querySelector('.' + cls.QUICK_DIALOG_ALERT_OK);
189
194
  if (editDeleteOnly) {
190
195
  editDeleteOnly.innerHTML = this.l10n.getConstant(this.parent.currentAction === 'Delete' ? 'deleteEvent' : 'editEvent');
@@ -206,6 +211,9 @@ var QuickPopups = /** @class */ (function () {
206
211
  this.showQuickDialog('RecurrenceAlert');
207
212
  };
208
213
  QuickPopups.prototype.openRecurrenceValidationAlert = function (type) {
214
+ if (!this.parent.prerenderDialogs) {
215
+ this.renderQuickDialog();
216
+ }
209
217
  this.quickDialogClass('Alert');
210
218
  var okButton = this.quickDialog.element.querySelector('.' + cls.QUICK_DIALOG_ALERT_OK);
211
219
  okButton.innerHTML = this.l10n.getConstant('ok');
@@ -249,6 +257,9 @@ var QuickPopups = /** @class */ (function () {
249
257
  if (this.parent.activeViewOptions.readonly) {
250
258
  return;
251
259
  }
260
+ if (!this.parent.prerenderDialogs) {
261
+ this.renderQuickDialog();
262
+ }
252
263
  var okButton = this.quickDialog.element.querySelector('.' + cls.QUICK_DIALOG_ALERT_OK);
253
264
  if (okButton) {
254
265
  okButton.innerHTML = this.l10n.getConstant('delete');
@@ -267,6 +278,9 @@ var QuickPopups = /** @class */ (function () {
267
278
  this.showQuickDialog('DeleteAlert');
268
279
  };
269
280
  QuickPopups.prototype.openValidationError = function (type, eventData) {
281
+ if (!this.parent.prerenderDialogs) {
282
+ this.renderQuickDialog();
283
+ }
270
284
  this.quickDialog.header = this.l10n.getConstant('alert');
271
285
  this.quickDialog.content = this.l10n.getConstant(type);
272
286
  var okButton = this.quickDialog.element.querySelector('.' + cls.QUICK_DIALOG_ALERT_OK);
@@ -296,6 +310,9 @@ var QuickPopups = /** @class */ (function () {
296
310
  if (!popupArgs.cancel) {
297
311
  _this.quickDialog.show();
298
312
  }
313
+ if (!_this.parent.prerenderDialogs && popupArgs.cancel) {
314
+ _this.destroyQuickDialog();
315
+ }
299
316
  });
300
317
  };
301
318
  QuickPopups.prototype.createMoreEventList = function (eventCollection, groupOrder, groupIndex) {
@@ -613,6 +630,7 @@ var QuickPopups = /** @class */ (function () {
613
630
  var cellDetails = void 0;
614
631
  var argsData = void 0;
615
632
  var resourceText = this.getResourceText(args, type.toLowerCase());
633
+ var isResourceEmpty = this.parent.isResourceCollectionEmpty();
616
634
  switch (type) {
617
635
  case 'Cell':
618
636
  cellDetails = this.getFormattedString(data);
@@ -647,7 +665,7 @@ var QuickPopups = /** @class */ (function () {
647
665
  content += '<div class="' + cls.DESCRIPTION_CLASS + '"><div class="' + cls.DESCRIPTION_ICON_CLASS + ' ' + cls.ICON +
648
666
  '"></div><div class="' + cls.DESCRIPTION_DETAILS_CLASS + ' ' + cls.TEXT_ELLIPSIS + '"></div></div>';
649
667
  }
650
- if (this.parent.resourceCollection.length > 0) {
668
+ if (this.parent.resourceCollection.length > 0 && !isResourceEmpty) {
651
669
  content += '<div class="' + cls.RESOURCE_CLASS + '"><div class="' + cls.RESOURCE_ICON_CLASS + ' ' + cls.ICON +
652
670
  '"></div><div class="' + cls.RESOURCE_DETAILS_CLASS + ' ' + cls.TEXT_ELLIPSIS + '"></div></div>';
653
671
  }
@@ -710,7 +728,8 @@ var QuickPopups = /** @class */ (function () {
710
728
  return footerTemplate;
711
729
  };
712
730
  QuickPopups.prototype.getResourceText = function (args, type) {
713
- if (this.parent.resourceCollection.length === 0) {
731
+ var isResourceEmpty = this.parent.isResourceCollectionEmpty();
732
+ if (this.parent.resourceCollection.length === 0 || isResourceEmpty) {
714
733
  return null;
715
734
  }
716
735
  var resourceValue = '';
@@ -950,7 +969,6 @@ var QuickPopups = /** @class */ (function () {
950
969
  };
951
970
  QuickPopups.prototype.dialogButtonClick = function (event) {
952
971
  this.dialogEvent = event;
953
- this.quickDialog.hide();
954
972
  var target = event.target;
955
973
  var cancelBtn = this.quickDialog.element.querySelector('.' + cls.QUICK_DIALOG_ALERT_CANCEL);
956
974
  var eventData = this.parent.activeEventData.event;
@@ -995,6 +1013,9 @@ var QuickPopups = /** @class */ (function () {
995
1013
  this.parent.uiStateValues.isIgnoreOccurrence = target.classList.contains(cls.QUICK_DIALOG_ALERT_CANCEL);
996
1014
  this.parent.eventWindow.eventSave(event, this.l10n.getConstant('ok'));
997
1015
  }
1016
+ if (!isNullOrUndefined(this.quickDialog)) {
1017
+ this.quickDialog.hide();
1018
+ }
998
1019
  };
999
1020
  QuickPopups.prototype.updateTapHoldEventPopup = function (target) {
1000
1021
  var selectedElements = this.parent.eventBase.getSelectedEventElements(target);
@@ -1062,6 +1083,9 @@ var QuickPopups = /** @class */ (function () {
1062
1083
  this.parent.trigger(event.popupClose, args, function (popupCloseArgs) {
1063
1084
  if (!popupCloseArgs.cancel) {
1064
1085
  _this.parent.eventBase.focusElement(true);
1086
+ if (!_this.parent.prerenderDialogs) {
1087
+ _this.destroyQuickDialog();
1088
+ }
1065
1089
  }
1066
1090
  });
1067
1091
  };
@@ -1388,7 +1412,9 @@ var QuickPopups = /** @class */ (function () {
1388
1412
  };
1389
1413
  QuickPopups.prototype.refreshQuickDialog = function () {
1390
1414
  this.destroyQuickDialog();
1391
- this.renderQuickDialog();
1415
+ if (this.parent.prerenderDialogs) {
1416
+ this.renderQuickDialog();
1417
+ }
1392
1418
  };
1393
1419
  QuickPopups.prototype.refreshQuickPopup = function () {
1394
1420
  this.destroyQuickPopup();
@@ -1399,7 +1425,7 @@ var QuickPopups = /** @class */ (function () {
1399
1425
  this.renderMorePopup();
1400
1426
  };
1401
1427
  QuickPopups.prototype.destroyQuickDialog = function () {
1402
- if (this.quickDialog.element) {
1428
+ if (this.quickDialog && this.quickDialog.element) {
1403
1429
  this.quickDialog.destroy();
1404
1430
  remove(this.quickDialog.element);
1405
1431
  this.quickDialog = null;