فهرست منبع

renderSkeleton dependency

Adam Shaw 8 سال پیش
والد
کامیت
2cc3516c17
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 2 0
      src/component/Component.js
  2. 1 1
      src/component/DateComponent.js

+ 2 - 0
src/component/Component.js

@@ -8,10 +8,12 @@ var Component = Model.extend({
 		this.el = el;
 		this.bindGlobalHandlers();
 		this.renderSkeleton();
+		this.set('renderedSkeleton', true);
 	},
 
 
 	removeElement: function() {
+		this.unset('renderedSkeleton');
 		this.unrenderSkeleton();
 		this.unbindGlobalHandlers();
 

+ 1 - 1
src/component/DateComponent.js

@@ -713,7 +713,7 @@ DateComponent.watch('businessHoursInChildren', [ 'businessHours' ], function(dep
 });
 
 
-DateComponent.watch('displayingDates', [ 'dateProfile' ], function(deps) {
+DateComponent.watch('displayingDates', [ 'renderedSkeleton', 'dateProfile' ], function(deps) {
 	this.requestRender('date', 'init', this.executeDateRender, [ deps.dateProfile ]);
 }, function() {
 	this.requestRender('date', 'destroy', this.executeDateUnrender);