You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the datepicker inside a dropdown, selecting a date closes not only the datepicker but also the dropdown.
This issue started occurring since ngx-bootstrap v18.0.2 after the changes introduced in this fix, specifically after adding the following line of code:
For some reason, this change emits a click event, which triggers the toggle click with false as its value. As a result, the hide() method in BsDropdownDirective is called, causing the dropdown to close unexpectedly.
Relevant call stack and behavior:
Reproduction
You can reproduce the issue in the following StackBlitz Example
Versions of ngx-bootstrap, Angular, and Bootstrap:
ngx-bootstrap: v18.0.2+ (bug introduced in v18.0.2. StackBlitz Example is v19.0.2)
Angular: v19.0.6
Bootstrap: v5.3.3
Expected Behavior
Selecting a date in the datepicker should only close the datepicker while keeping the dropdown open.
Actual behaviour:
Selecting a date in the datepicker closes datepicker and dropdown.
Additional Context
This behavior was not present in versions prior to v18.0.2 and appears to be a regression due to the linked PR.
Would appreciate any insights or potential workarounds in the meantime. Thanks!
The text was updated successfully, but these errors were encountered:
When using the datepicker inside a dropdown, selecting a date closes not only the datepicker but also the dropdown.
This issue started occurring since ngx-bootstrap v18.0.2 after the changes introduced in this fix, specifically after adding the following line of code:
ngx-bootstrap/src/component-loader/component-loader.class.ts
Line 229 in 7d87cb4
For some reason, this change emits a click event, which triggers the toggle click with false as its value. As a result, the
hide()
method in BsDropdownDirective is called, causing the dropdown to close unexpectedly.Relevant call stack and behavior:
ngx-bootstrap/src/dropdown/bs-dropdown-toggle.directive.ts
Line 50 in 7d87cb4
ngx-bootstrap/src/dropdown/bs-dropdown.directive.ts
Line 277 in 7d87cb4
Reproduction
You can reproduce the issue in the following StackBlitz Example
Versions of ngx-bootstrap, Angular, and Bootstrap:
Expected Behavior
Selecting a date in the datepicker should only close the datepicker while keeping the dropdown open.
Actual behaviour:
Selecting a date in the datepicker closes datepicker and dropdown.
Additional Context
This behavior was not present in versions prior to v18.0.2 and appears to be a regression due to the linked PR.
Would appreciate any insights or potential workarounds in the meantime. Thanks!
The text was updated successfully, but these errors were encountered: