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

<IxSelect> itemSelectionChange is triggered two times after adding item #1424

Closed
2 tasks done
AnnaGrahl opened this issue Aug 12, 2024 · 2 comments
Closed
2 tasks done
Labels
type: bug Something isn't working Workflow: Issue created JIRA issue is created and will be analyzed

Comments

@AnnaGrahl
Copy link

Prerequisites

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

What happened?

The event itemSelectionChange is triggered two times after adding an item to an editable select. The second time it is triggered, the value is an object and not the value string.
image

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

Angular

Which version of iX do you use?

v2.4

Code to produce this issue.

https://stackblitz.com/edit/k4whud?file=src%2Fapp%2Fselect-editable.ts

import { Component } from '@angular/core';

@Component({
  selector: 'app-example',
  template: `
    <ix-select 
    editable [value]="value"
    (itemSelectionChange)="OnSelectionChange($event)"
    >
      <ix-select-item label="Item 1" value="1"></ix-select-item>
      <ix-select-item label="Item 2" value="2"></ix-select-item>
      <ix-select-item label="Item 3" value="3"></ix-select-item>
      <ix-select-item label="Item 4" value="4"></ix-select-item>
    </ix-select>
  `,
})
export default class SelectEditable {
  value = '1';

  OnSelectionChange(event: Event) {
    const value = (event as CustomEvent)?.detail;
    console.log(value);
  }
}
@AnnaGrahl AnnaGrahl 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 @AnnaGrahl

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-1624

@matthiashader
Copy link
Collaborator

Hello @AnnaGrahl - this issue is resolved in the latest version (2.5.0), if this issue persists don't hesitate to open a new ticket! (https://stackblitz.com/edit/owvupc?file=src%2Fselect-editable.ts)

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