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

ix-select #1425

Open
2 tasks done
pkCrazy opened this issue Aug 12, 2024 · 1 comment
Open
2 tasks done

ix-select #1425

pkCrazy opened this issue Aug 12, 2024 · 1 comment
Labels
type: bug Something isn't working Workflow: Issue created JIRA issue is created and will be analyzed

Comments

@pkCrazy
Copy link

pkCrazy commented Aug 12, 2024

Prerequisites

  • I have read the Contributing Guidelines.
  • I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.

What happened?

ix-select does not show the selected value when items are set dynamically.

image

As you can see 'item 1' gets selected but ix-select itself still shows 'Select an option'.

I expect that ix-select shows 'item 1' instead of 'Select an option'.

What type of frontend framework are you seeing the problem on?

Angular

Which version of iX do you use?

2.4.1

Code to produce this issue.

import { Component } from '@angular/core';
import { map, Subject, timer } from 'rxjs';

@Component({
  selector: 'app-root',
  template: `
    <ix-select [value]="selectedValue">
      <ix-select-item *ngFor="let value of values$ | async"
        [label]="value"
        [value]="value"
        [selected]="value === selectedValue"
      />
    </ix-select>
  `,
  styleUrl: './app.component.css'
})
export class AppComponent {
  selectedValue = ''

  values$ = new Subject<string[]>()

  valuesChange = this.values$.subscribe(values => this.selectedValue = values[0])

  subscription = timer(2000).pipe(
    map(() => ['item 1', 'item 2', 'item 3']),
  ).subscribe(this.values$)
}
@pkCrazy pkCrazy added the triage We discuss this topic in our internal weekly label Aug 12, 2024
@matthiashader matthiashader added type: bug Something isn't working Workflow: Issue created JIRA issue is created and will be analyzed and removed triage We discuss this topic in our internal weekly labels Aug 26, 2024
Copy link
Contributor

github-actions bot commented Aug 26, 2024

🤖 Hello @pkCrazy

Your issue will be analyzed and is part of our internal workflow.
To get informed about our workflow please checkout the Contributing Guidelines

JIRA: IX-1622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working Workflow: Issue created JIRA issue is created and will be analyzed
Projects
None yet
Development

No branches or pull requests

2 participants