NbToastr disappears if we change nb-layout
- 主要语言
- TypeScript
- 星标
- 8.1k
- 派生
- 1.5k
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Issue type
**I'm submitting a ...** (check one with "x")
* [x ] bug report
* [x ] feature request
### Issue description
NbToastr shouldn't depend on nb-layout.
**Current behavior:**
When trying to show a toast for a long time or a toast that we don't want it to close, if we change nb-layout either by changing route or just by an ng-if the toast disappears.
**Expected behavior:**
Toast shouldn't disappear when changing nb-layout
**Steps to reproduce:**
1. Go to ngx-admin demo page toastr example: https://www.akveo.com/ngx-admin/pages/modal-overlays/toastr
2. In the input to choose time to hide toast type 0 (so that the toast never disappears)
3. Click show toast.
4. Then go to the menu and click auth -> login.
5. Check that the toast disappears.
**Related code:**
Check ngx-admin demo code.
### Example use case:
When user session expires I want to show a toast saying that the session has expired and redirect the user to the login.
I'm not able to do it because the toast just doesn't show up, either because it disappears if I show before changing nb-layout or an error is thrown if I try to show after I change nb-layout because there's no container to put it.
贡献指南
评估
这个 Issue 还没有评估数据。