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

Select component - different behavior after update to 2.6.X #1626

Closed
2 tasks done
ugurbayraktarr opened this issue Dec 17, 2024 · 1 comment
Closed
2 tasks done

Select component - different behavior after update to 2.6.X #1626

ugurbayraktarr opened this issue Dec 17, 2024 · 1 comment
Labels
triage We discuss this topic in our internal weekly

Comments

@ugurbayraktarr
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?

When the user clears the value of the Select component, the value of onValueChange is an empty array. In previous versions it was null.
Is it a bug, or expected behavior?

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

React

Which version of iX do you use?

v2.6.1

Code to produce this issue.

Steps to reproduce:
- Select a value
- Click the clear icon

ix 2.5.0: https://stackblitz.com/edit/vwaqrkw4-4txap4vx?file=package.json
ix 2.6.0: https://stackblitz.com/edit/vwaqrkw4-y4cujgze?file=package.json
@ugurbayraktarr ugurbayraktarr added the triage We discuss this topic in our internal weekly label Dec 17, 2024
@nuke-ellington
Copy link
Collaborator

Hello @ugurbayraktarr,

thank you for reaching out.

The return value of null was actually a bug since the data type of the value property is string | string[] which cannot be null and defaults to [].

See also ix-select API table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage We discuss this topic in our internal weekly
Projects
None yet
Development

No branches or pull requests

2 participants