Skip to content

Dropdown with choicesByUrl: defaultValue resolves to "Other" when showOtherItem is enabled #10926

@willnippard

Description

@willnippard

Describe the bug
A dropdown with a complex (object) value appears as Other [object Object] iff 'Enable the "Option" option' is turned on, instead of showing it's intended display value (label).
Note: the actual value saved stays correct. Best guess is a lazy/eager load issue, or similar, from what I can see.

Steps to reproduce

  1. Set up dropdown with choicesByUrl, and set up to store complex (object) values
  2. Set a default value for the dropdown
  3. Enable Other option
  4. See [object Object] in dropdown selection.

Expected behavior
Dropdown appears with the correct label.

Screenshots
Image

Please complete the following information:

  • Browser: tested on Chrome, Firefox, and Safari
  • Browser version: various, all recent
  • JS framework/library: React
  • SurveyJS version: 2.5.8
  • Device: laptop & iPhone

Metadata

Metadata

Assignees

Labels

buguser issueAn issue or bug reported by users

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions