Refactors event handling and grid rendering
Improves calendar performance and data flow by streamlining event emissions and grid rendering logic. - Replaces generic CONFIG_UPDATE events with REFRESH_REQUESTED for more specific refresh triggers. - Removes redundant grid re-renders on DATE_CHANGED and WEEK_CHANGED events, delegating navigation to NavigationManager. - Introduces VIEW_CHANGED and DATE_CHANGED events for calendar mode and date selection, respectively. - NavigationManager now handles date validation. - Moves rendering logic from NavigationManager to NavigationRenderer. - Syncs scroll position based on PERIOD_CHANGED instead of NAVIGATION_ANIMATION_COMPLETE. This change optimizes the calendar's responsiveness and reduces unnecessary re-renders, leading to a smoother user experience.
This commit is contained in:
parent
4b4dbdc0d6
commit
83c0ce801c
9 changed files with 59 additions and 47 deletions
|
|
@ -144,6 +144,7 @@ export class CalendarManager {
|
|||
this.eventBus.emit(CoreEvents.DATE_CHANGED, {
|
||||
previousDate,
|
||||
currentDate: this.currentDate,
|
||||
date: this.currentDate, // Add for backward compatibility
|
||||
view: this.currentView
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue