Comments (2)
I took the code into my own project, edited it this way and fixed the bug. Maybe it will help
constructor(
@Inject(ActivatedRoute) private readonly route: ActivatedRoute,
@Inject(Router) private readonly router: Router,
@Inject(TuiDialogService) dialogs: TuiDialogService,
@Inject(Injector) injector: Injector,
@Self() @Inject(TuiDestroyService) destroy$: TuiDestroyService
) {
dialogs
.open(
new PolymorpheusComponent(this.route.snapshot.data['dialog'], injector),
this.route.snapshot.data['dialogOptions']
)
.pipe(takeUntil(destroy$))
.subscribe({
complete: () => this.navigateToParent(),
});
}
ngOnInit(): void {
this.dialogUrl = this.router.url;
this.parentUrl = this.getParentUrl();
}
private navigateToParent(): void {
if (this.dialogUrl !== this.router.url) {
return;
}
void this.router.navigate([this.parentUrl], {
relativeTo: this.route,
queryParamsHandling: 'preserve',
});
}
private getParentUrl(): string {
const isLazy = this.route.snapshot.data['isLazy'];
const backUrl = isLazy ? this.getLazyLoadedBackUrl() : this.route.snapshot.data['backUrl'];
return backUrl;
}
private getLazyLoadedBackUrl(): string {
const urlSegments: UrlSegment[] = this.route.parent?.snapshot.url || [];
return urlSegments.map(() => '..').join('/');
}
from taiga-ui.
Thank you for your feedback about this bug! The code example helped to understand the incorrect behavior
Fix will be in this PR — #6885
from taiga-ui.
Related Issues (20)
- 🐞 - Cannot select text in nested hint HOT 2
- 🐞 - Incorrect tui-input-date-time value after several clicks HOT 1
- 🐞 - New `Textfield` with `<select tuiTextfield />` has incorrect behavior on IOS HOT 2
- 🐞 - `InputDateTime` with `[max]` distorts value on click HOT 1
- 🐞 - некорректные стили компонента RadioBlock
- 🐞 - MobileCalendarRange открывается в начале выбранного диапазона
- 🚀 - `TuiDialogService.open()` should be properly typed HOT 14
- 🐞 - incorrect displaying input-number with stepper in safari
- 🐞 - `InputDateTime` should format textfield value on blur in the same way as `InputTime`
- 🐞 - Скролл к инпуту после открытия мультиселекта
- 🐞 - AlertService - Nothing displayed HOT 8
- 🐞 - tinkoff_ng_dompurify_createDOMPurify is not a function on Angular 17 SSR HOT 5
- 🐞 - tui-scroll-controlls на скрывается на ipad 5 mini в пользу нативного
- 🐞 - Calendar does not open when nativePicker is enabled
- 🐞 - tuiAccordionItemContent SSR issue during hydration
- 🐞 - calendar-range does not mark checked item from range if items with equal range periods HOT 3
- 🐞 - `Textarea` does not display emoji in `Safari`
- 🐞 - `TUI_TOUCH_SUPPORTED` does not work correctly for users with a laptop touchscreen
- 🐞 - `ItemsWithMore` is not compatible with items with `pointer-events: all`
- 🐞 - `addon-doc` fails to compile in `Angular v18` app HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taiga-ui.