Skip to content

DxcSelect crashes application with searchable, multiple and empty array #1786

@djdannycastillo

Description

@djdannycastillo

Describe the bug
DxcSelect crashes application when setting select with searchable, multiple and receives an empty array.

To Reproduce
Try below component

<DxcSelect label="Select your coworkers" placeholder="Choose a colleague" options={[]} searchable multiple />

Example:

  1. Try adding the DxcSelect with searchable and multiple option
  2. Pass an empty array and you should see app crash

Expected behaviour
Avoid app crash when the component receives an empty array

Screenshots
Screenshot 2024-01-29 at 19 18 38

Add labels
Bug

Metadata

Metadata

Assignees

Labels

AnswersA high priority issue from the Assure Answers team.bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions