Skip to content

fix(datepicker): collapse month/year grid after selection#39

Open
matharoo wants to merge 1 commit into
digitalspace:masterfrom
matharoo:fix/datepicker-month-year-view-toggle
Open

fix(datepicker): collapse month/year grid after selection#39
matharoo wants to merge 1 commit into
digitalspace:masterfrom
matharoo:fix/datepicker-month-year-view-toggle

Conversation

@matharoo

Copy link
Copy Markdown

NgdsCalendar drove its *ngIf views off the @input() displayDepth, which round-trips through NgdsCalendarManager — leaving the date grid and the month/year grid visible at once. Track view depth in a local updated directly in the calendar's own click handlers so its *ngIf re-evaluates immediately; still emit changeDepth/Month/Year for nav.

Also widen NgdsDropdown.dropdownClasses to string | string[].

Fixes the issue: bcgov/reserve-rec-public#569

  NgdsCalendar drove its *ngIf views off the @input() displayDepth, which
  round-trips through NgdsCalendarManager — leaving the date grid and the
  month/year grid visible at once. Track view depth in a local
  updated directly in the calendar's own click handlers so its *ngIf
  re-evaluates immediately; still emit changeDepth/Month/Year for nav.

  Also widen NgdsDropdown.dropdownClasses to string | string[].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant