adopted-ember-addons / ember-pikaday

A datepicker component for Ember CLI projects.
MIT License
158 stars 169 forks source link

Deprecation warning on Ember 1.13.x due to modifying properties in `didInsertElement` hook #62

Closed iancanderson closed 8 years ago

iancanderson commented 8 years ago

See http://emberjs.com/deprecations/v1.x/#toc_modifying-a-property-within-code-didinsertelement-code

The issue is that didInsertElement results in this.set() calls, which cause rerendering and performance issues: https://github.com/edgycircle/ember-pikaday/blob/b6440b6ec9d363669566558e059ea8b73bb7a47b/addon/components/pikaday-input.js#L11

A potential workaround is moving this code into didRender

peteonrails commented 8 years ago

This became a blocker for me in my latest project. Here is my workaround. https://github.com/edgycircle/ember-pikaday/pull/64

stravid commented 8 years ago

I just released 1.0.0 which includes this fix, thanks for reporting.