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

refactor(datepicker): move <select> value binding to lifecycle hook #3163

Merged
merged 1 commit into from
Oct 4, 2019

Conversation

marclaval
Copy link
Contributor

In View Engine, directives are updated before property bindings. So elements are created/updated before the [value] binding is set/updated in . In the end, the right option is selected in the browser. In Ivy, things are executed in the reverse order. Setting the value property of a when there is no matching does nothing in a real browser. As a result, the first option is always selected after the first render.

@codecov-io
Copy link

Codecov Report

Merging #3163 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3163      +/-   ##
==========================================
+ Coverage    90.9%   90.93%   +0.03%     
==========================================
  Files          95       95              
  Lines        2748     2759      +11     
  Branches      510      513       +3     
==========================================
+ Hits         2498     2509      +11     
  Misses        190      190              
  Partials       60       60
Flag Coverage Δ
#e2e 55.27% <84.61%> (+0.1%) ⬆️
#unit 87.99% <100%> (+0.04%) ⬆️
Impacted Files Coverage Δ
src/datepicker/datepicker-navigation-select.ts 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 c169b08...df2b599. Read the comment docs.

Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

This one is indeed more verbose, but more stable test-wise.

@maxokorokov maxokorokov merged commit 36918b5 into ng-bootstrap:master Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants