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

feat(datepicker): change 'select' event to 'dateSelect' #3461

Merged
merged 2 commits into from Jan 9, 2020

Conversation

peterblazejewicz
Copy link
Contributor

This commit changes name of the component custom event to avoid
conflicts with native 'select' event.
Existing event name is marked as deprecated for backward compatibility.

Fixes #3444

Thanks!

@codecov-io
Copy link

codecov-io commented Nov 11, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3461      +/-   ##
==========================================
+ Coverage   91.59%   91.59%   +<.01%     
==========================================
  Files         100      100              
  Lines        2867     2868       +1     
  Branches      527      527              
==========================================
+ Hits         2626     2627       +1     
  Misses        183      183              
  Partials       58       58
Flag Coverage Δ
#e2e 56.45% <100%> (+0.01%) ⬆️
#unit 88.41% <100%> (ø) ⬆️
Impacted Files Coverage Δ
src/datepicker/datepicker-service.ts 97.27% <100%> (ø) ⬆️
src/datepicker/datepicker-input.ts 96.37% <100%> (ø) ⬆️
src/datepicker/datepicker.ts 97.89% <100%> (+0.02%) ⬆️
src/modal/modal-backdrop.ts 100% <0%> (ø) ⬆️
src/accordion/accordion.ts 98.43% <0%> (ø) ⬆️
src/tabset/tabset.ts 100% <0%> (ø) ⬆️
src/carousel/carousel.ts 98.83% <0%> (ø) ⬆️
src/typeahead/typeahead-window.ts 100% <0%> (ø) ⬆️
src/rating/rating.ts 100% <0%> (ø) ⬆️
src/progressbar/progressbar.ts 100% <0%> (ø) ⬆️

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 8574673...14d59b3. 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.

Hey, @peterblazejewicz!

Thanks for the PR, just left one comment.

get dateSelect$(): Observable<NgbDate> { return this._dateSelect$.pipe(filter(date => date !== null)); }

/** @deprecated please use `dateSelect$` */
get select$(): Observable<NgbDate> { return this.dateSelect$; }
Copy link
Member

Choose a reason for hiding this comment

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

This should be removed, not deprecated because NgbDatepickerService is the internal implementation. I'd say either:

  • don't rename _select$ and get select() at all, because it's internal (I think I prefer this personally)
  • or remove this deprecation completely, because it should not be used anywhere anyway

peterblazejewicz and others added 2 commits January 9, 2020 12:16
This commit changes name of the component custom event to avoid
conflicts with native 'select' event.

Existing event name will be marked as deprecated in v6.

Fixes ng-bootstrap#3444
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.

Focus on datepicker footer triggers extra selects
3 participants