github-actions
released this
25 Nov 15:56
·
3 commits
to master
since this release
18.0.0-beta.9 (2024-11-25)
Bug Fixes
- workbench/view: invoke
CanClose
guard in view injection context (07ba936), closes #578 - workbench/view: prevent
CanClose
guard from blocking workbench navigation (12e9e91), closes #558 - workbench/view: prevent closing views with a pending
CanClose
guard (4326a63)
Features
- workbench/view: add functional
CanClose
guard, deprecate class-based guard (c2ee531)
Deprecations
-
workbench/view: The class-based
CanClose
guard has been deprecated in favor of a functional guard that can be registered onWorkbenchView.canClose
.Migrate by registering a callback on
WorkbenchView.canClose
instead of implementing theCanClose
interface.Before migration:
import {CanClose} from '@scion/workbench'; import {Component} from '@angular/core'; @Component({}) export class ViewComponent implements CanClose { public canClose(): boolean { return true; } }
After migration:
import {Component, inject} from '@angular/core'; import {WorkbenchView} from '@scion/workbench'; @Component({}) export class ViewComponent { constructor() { inject(WorkbenchView).canClose(() => { return true; }); } }