Skip to content

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