material icon indicating copy to clipboard operation
material copied to clipboard

select: label cannot be dynamically updated when used inside of md-input-container

Open cmevawala opened this issue 7 years ago • 5 comments

When the label of a md-select is dynamically updated via data binding it doesn't actually render correctly until you open the select dialog and close it.

You can see the behaviour in action here: http://codepen.io/vrosa/pen/BjjYZy

Make a selection on the first md-select and notice that the label for the input field is properly updated, whereas you need to click the second md-select and close it to make it work.

I know 4f3c5d91 solved related issues but not this specific one.

cmevawala avatar Mar 07 '18 08:03 cmevawala

I just had the same issue today. Never had it before though... Maybe it is something related to the last AngularJS Material version?

BorlandFA avatar Mar 08 '18 12:03 BorlandFA

@BorlandFA please let me know if you can find a past AngularJS Material version where this worked properly. I'll mark it as a regression and elevate the priority in that case.

Splaktar avatar Mar 12 '18 17:03 Splaktar

@cmevawala Thank you for taking the time to submit this issue. However it does not follow our required issue template.

Please update the description to follow the template. This gives the team the information needed to investigate the bug or prioritize the feature. Normally, I would just close any issue that didn't follow the template, but thankfully you do have a CodePen demo and linked to a related commit. Thank you.

Splaktar avatar Mar 12 '18 17:03 Splaktar

While the CodePen in the OP used AngularJS Material 1.0.0, I was able to reproduce this in a CodePen using 1.1.7.

This works fine with a standalone md-select element (using the placeholder property), but breaks when you put it inside of a md-input-container element, and need to use a label element, so that it will align in a form.

Splaktar avatar Mar 12 '18 17:03 Splaktar

Maybe I've never had the issue because I was not using it inside of a md-input-container before, so probably it was a bug from the beginning, not a regression one...

BorlandFA avatar Mar 14 '18 13:03 BorlandFA