Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 74f833f

Browse files
committed
fix(calendar): don't trigger dropdown refresh
1 parent 95084c9 commit 74f833f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/public/app/widgets/buttons/calendar.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ export default class CalendarWidget extends RightDropdownButtonWidget {
8686

8787
// Month navigation
8888
this.$monthSelect = this.$dropdownContent.find('[data-calendar-input="month"]');
89+
this.$monthSelect.on("show.bs.dropdown", (e) => {
90+
// Don't trigger dropdownShown() at widget level when the month selection dropdown is shown, since it would cause a redundant refresh.
91+
e.stopPropagation();
92+
});
8993
this.monthDropdown = bootstrap.Dropdown.getOrCreateInstance(this.$monthSelect);
9094
this.$dropdownContent.find('[data-calendar-input="month-list"] button').on("click", (e) => {
9195
this.date.setMonth(e.target.dataset.value);
@@ -218,6 +222,7 @@ export default class CalendarWidget extends RightDropdownButtonWidget {
218222
}
219223

220224
async createMonth() {
225+
console.log(new Error());
221226
const month = utils.formatDateISO(this.date).substr(0, 7);
222227
const dateNotesForMonth = await server.get(`special-notes/notes-for-month/${month}`);
223228

0 commit comments

Comments
 (0)