Skip to content

Commit

Permalink
fix(core): Dropdown fix options leaking upwards (#9051)
Browse files Browse the repository at this point in the history
  • Loading branch information
waterplea authored Sep 16, 2024
1 parent e1853dd commit 350ba52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {FactoryProvider} from '@angular/core';
import {type FactoryProvider, Self} from '@angular/core';
import {Directive, inject, Input, Optional, SkipSelf} from '@angular/core';
import {tuiCreateToken, tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';
import type {TuiVerticalDirection} from '@taiga-ui/core/types';
Expand Down Expand Up @@ -38,7 +38,7 @@ export const tuiDropdownOptionsProvider: (
) => FactoryProvider = (override: Partial<TuiDropdownOptions>) => ({
provide: TUI_DROPDOWN_OPTIONS,
deps: [
[new Optional(), TuiDropdownOptionsDirective],
[new Optional(), new Self(), TuiDropdownOptionsDirective],
[new Optional(), new SkipSelf(), TUI_DROPDOWN_OPTIONS],
],
useFactory: tuiOverrideOptions(override, TUI_DROPDOWN_DEFAULT_OPTIONS),
Expand Down
4 changes: 2 additions & 2 deletions projects/core/directives/hint/hint-options.directive.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {FactoryProvider, OnChanges} from '@angular/core';
import {type FactoryProvider, type OnChanges, Self} from '@angular/core';
import {Directive, inject, Input, Optional, SkipSelf} from '@angular/core';
import {tuiCreateToken, tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';
import {tuiOverrideOptions} from '@taiga-ui/core/utils';
Expand Down Expand Up @@ -61,7 +61,7 @@ export const tuiHintOptionsProvider: (
) => FactoryProvider = (override: Partial<TuiHintOptions>) => ({
provide: TUI_HINT_OPTIONS,
deps: [
[new Optional(), TuiHintOptionsDirective],
[new Optional(), new Self(), TuiHintOptionsDirective],
[new Optional(), new SkipSelf(), TUI_HINT_OPTIONS],
],
useFactory: tuiOverrideOptions(override, TUI_HINT_DEFAULT_OPTIONS),
Expand Down

0 comments on commit 350ba52

Please sign in to comment.