Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sidebar): minimized state @Input/@Output #84

Merged
merged 2 commits into from
Oct 23, 2019
Merged

feat(sidebar): minimized state @Input/@Output #84

merged 2 commits into from
Oct 23, 2019

Conversation

Hagith
Copy link
Contributor

@Hagith Hagith commented Oct 17, 2019

  • When minimized input property is set from outside, sidebar will properly switch it's state, eg:
    [minimized]="sidebar.minimized$ | async"
  • It's possible to listen to minimized value changes, eg. to persist in localStorage
    [(minimized)]="minimized" or
    [minimized]="minimized$ | async" (minimizedChange)="minimized$.next($event)"

@Hagith
Copy link
Contributor Author

Hagith commented Oct 17, 2019

Side note: This allows also to replace MutationObserver used in coreui-free-angular-admin-template for diabling perfectScrollbar when minimized: https://github.com/coreui/coreui-free-angular-admin-template/blob/master/src/app/containers/default-layout/default-layout.component.ts#L17
I can prepare PR if you decide to accept this change.

- When `minimized` input property is set from outside,
  sidebar will properly switch it's state, eg:
  `[minimized]="sidebar.minimized$ | async"`
- It's possible to listen to `minimized` value changes,
  eg. to persist in localStorage
  `[(minimized)]="minimized"` or
  `[minimized]="minimized$ | async" (minimizedChange)="minimized$.next($event)"`
@xidedix xidedix merged commit f3bf677 into coreui:master Oct 23, 2019
@Hagith Hagith deleted the sidebar-minimized-state branch October 24, 2019 13:47
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.

2 participants