Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(select): Fix floating label for pre-selected option #2306

Merged
merged 5 commits into from
Feb 27, 2018

Conversation

williamernest
Copy link
Contributor

Fixes: #2282
Added tests and demo to check for regression.

@williamernest williamernest changed the title Fix/select/fix floating label fix(select): Fix floating label for pre-selected option Feb 24, 2018
@codecov-io
Copy link

codecov-io commented Feb 24, 2018

Codecov Report

Merging #2306 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2306      +/-   ##
==========================================
+ Coverage   99.07%   99.07%   +<.01%     
==========================================
  Files          99       99              
  Lines        4004     4007       +3     
  Branches      515      516       +1     
==========================================
+ Hits         3967     3970       +3     
  Misses         37       37
Impacted Files Coverage Δ
packages/mdc-select/foundation.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 807b6ce...f9a0b53. Read the comment docs.

Copy link
Contributor

@acdvorak acdvorak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One super tiny nit - otherwise LGTM!

setSelectedCb.addEventListener('change', function() {
select.selectedIndex = this.checked ? 0 : -1;
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Remove blank line

@@ -196,6 +204,8 @@ <h2 class="mdc-typography--title">Select box</h2>
var rtlCb = document.getElementById('rtl');
var alternateColorsCb = document.getElementById('alternate-colors');
var disabledCb = document.getElementById('disabled');
var setSelectedCb = document.getElementById('set-selected-checkbox');

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Remove blank line

@williamernest williamernest merged commit d8dae34 into master Feb 27, 2018
@williamernest williamernest deleted the fix/select/fix-floating-label branch February 27, 2018 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants