ngx-bootstrap
                                
                                 ngx-bootstrap copied to clipboard
                                
                                    ngx-bootstrap copied to clipboard
                            
                            
                            
                        fix(datepicker): update subscriptions of datepicker-inline and daterangepicker-inline
Context
Both datepicker-inline and daterangepicker-inline don't update their subscriptions to the datepicker instance  after calling setConfig.
This causes the datepicker to not fire bsValueChanges after one of the datepickers inputs have changed.
Changes
- Introduce updateSubscriptions method to unsubscribe from previous subscriptions and to create new subscriptions on new _datepickerRef.instance
- Reduce calls to setConfig by introducing a shouldSetConfig flag, thereby batching complex updates together
Closes #5888 where EventEmitter does not fire after Input changes
PR Checklist
Before creating new PR, please take a look at checklist below to make sure that you've done everything that needs to be done before we can merge it.
- [x] read and followed the CONTRIBUTING.md guide.
- [x] built and tested the changes locally.
- [x] added/updated tests.
- [x] added/updated API documentation.
- [x] added/updated demos.
Codecov Report
Merging #6201 (b22cff9) into development (e3b2d7d) will decrease coverage by
0.04%. The diff coverage is36.36%.
:exclamation: Current head b22cff9 differs from pull request most recent head c333dc7. Consider uploading reports for the commit c333dc7 to get more accurate results
@@               Coverage Diff               @@
##           development    #6201      +/-   ##
===============================================
- Coverage        77.52%   77.47%   -0.05%     
===============================================
  Files              302      302              
  Lines            10549    10566      +17     
  Branches          2583     2587       +4     
===============================================
+ Hits              8178     8186       +8     
- Misses            2361     2370       +9     
  Partials            10       10              
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/datepicker/bs-datepicker-inline.component.ts | 53.33% <36.36%> (+0.24%) | :arrow_up: | 
| .../datepicker/bs-daterangepicker-inline.component.ts | 59.30% <36.36%> (+0.32%) | :arrow_up: | 
| src/chronos/i18n/pl.ts | 81.66% <0.00%> (-3.34%) | :arrow_down: | 
| src/chronos/i18n/cs.ts | 87.64% <0.00%> (ø) | |
| src/chronos/i18n/sk.ts | 85.13% <0.00%> (ø) | 
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update e3b2d7d...c333dc7. Read the comment docs.
  
   
Test summary
Run details
| Project | ngx-bootstrap | 
| Status | Failed | 
| Commit | b22cff9759 ℹ️ | 
| Started | Aug 20, 2021 10:24 AM | 
| Ended | Aug 20, 2021 10:37 AM | 
| Duration | 13:05 💡 | 
| OS | Linux Ubuntu - 20.04 | 
| Browser | Electron 87  | 
View run in Cypress Dashboard ➡️
Failures
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard
Does anyone have an ETA on this PR being approved and merged? This is currently blocking my app from being deployed as the inline calendar has these bugs.
Hey, I would love to reduce the amount of work you have to deal with on this PR. Would resolving the conflicts with the current development branch do any good?


 14 •
 14 •  0
 0 
        
 
             
             
             
             
             
             
             
             
            