Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular dropdown integration not a optimal solution #154

Closed
danielleroux opened this issue Nov 21, 2022 · 0 comments · Fixed by #223
Closed

angular dropdown integration not a optimal solution #154

danielleroux opened this issue Nov 21, 2022 · 0 comments · Fixed by #223
Assignees
Labels
type: enhancement New feature or request
Milestone

Comments

@danielleroux
Copy link
Collaborator

I'm submitting a...


[ ] Bug report
[x] Feature request
[ ] Documentation issue or request

Current behavior

Dropdown can be triggered via trigger element as id selector or as html element. Unfortunately this is not easy with the angular template engine.

Expected behavior

Add a angular framwork integration like a directive e.g.

Directive:

@Directive({
  selector: '[ixDropdownTrigger]',
})
export class IxDropdownTriggerDirective {
  @Input() ixDropdownTrigger!: any;

  constructor(private element: ElementRef) {}

  protected ngOnChanges() {
    this.element.nativeElement.trigger = this.ixDropdownTrigger.el;
  }
}

Usage:

<ix-button #trigger>test</ix-button>
<ix-dropdown [ixDropdownTrigger]="trigger">
  <ix-dropdown-item label="test"></ix-dropdown-item>
  <ix-dropdown-item label="test"></ix-dropdown-item>
  <ix-dropdown-item label="test"></ix-dropdown-item>
</ix-dropdown>
@danielleroux danielleroux added this to the 1.2.0 milestone Nov 21, 2022
@danielleroux danielleroux moved this to Jour Fix in Siemens iX Nov 21, 2022
@danielleroux danielleroux moved this from Jour Fix to Accepted in Siemens iX Nov 21, 2022
@danielleroux danielleroux changed the title angular dropdown integration not optiomal angular dropdown integration not a optimal solution Nov 21, 2022
@danielleroux danielleroux self-assigned this Dec 6, 2022
@danielleroux danielleroux moved this from Accepted to In Progress in Siemens iX Dec 6, 2022
@danielleroux danielleroux linked a pull request Dec 6, 2022 that will close this issue
14 tasks
Repository owner moved this from In Progress to Done in Siemens iX Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant