angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.31k stars 6.72k forks source link

DatePicker duplicates md-datepicker container every time you open the calendar #5151

Open icampo-cic opened 7 years ago

icampo-cic commented 7 years ago

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When clicking the calendar icon to open the datepicker it should open the same md-datepicker container every time.

What is the current behavior?

Every time you click the little calendar icon to open the datePicker it creates another md-datepicker container wich results in multiple md-datepicker containers and the last one with the actual calendar.

What are the steps to reproduce?

  1. Open the datepicker
  2. Close the datepicker
  3. Re-open the date picker
  4. See the duplicated MdDatePickerContent with Augury Chrome plugin.

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

What is the use-case or motivation for changing an existing behavior?

Improve performance

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular: v4.0.0 Material: v2.0.0@beta.6

RobJacobs commented 7 years ago

I'm not seeing that behavior on the demo site when inspecting the DOM: https://material.angular.io/components/component/datepicker

icampo-cic commented 7 years ago

The demo site can't be inspected with Augury since it is in production mode. It isn't a visual issue, you can only see it in Augury.

RobJacobs commented 7 years ago

@icampo1103 Yeah, I'm seeing it in the memory profiler

hsuanxyz commented 6 years ago

@RobJacobs Any progress? autocomplete component has the same problem.