Skip to content

ROU-13034: Fix add new option when Dropdown Search has no options - #1257

Merged
os-davidlourenco merged 3 commits into
devfrom
ROU-13034
Sep 11, 2026
Merged

os-davidlourenco merged 3 commits into
devfrom
ROU-13034

Conversation

@os-davidlourenco

Copy link
Copy Markdown
Contributor

This PR is for fixing a crash when adding a new option to a Dropdown Search that currently has no options.

What was happening

  • When Dropdown Search had an empty options list, using add new option caused _getOptionInfo to look up a missing grouped option and throw while reading figure prefix data.

What was done

  • Guarded the option lookup in _getOptionInfo so icon and image prefix rendering only runs when the option exists.

Test Steps

  1. Open a page with a Dropdown Search that has no options and allow adding new options enabled.
  2. Type a new value and add it.
  3. Confirm the new option is added and the dropdown does not throw.
  4. Repeat with a Dropdown Search that already has options, including options with icons or images, and confirm prefixes still render.

Screenshots

(prefer animated gif)

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems (if so, provide a module with changes)
  • requires new sample page in OutSystems (if so, provide a module with changes)

@os-davidlourenco
os-davidlourenco requested a review from a team as a code owner September 10, 2026 15:25
@os-davidlourenco os-davidlourenco added the bug Something isn't working label Sep 10, 2026
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

🖼️ Storybook: Chromatic UI tests result: ✅ Passed

Metric Value
Visual changes 1
Errors 0
Storybook Preview
Chromatic Build View Results

@os-davidlourenco
os-davidlourenco merged commit d0b23fb into dev Sep 11, 2026
15 checks passed
@os-davidlourenco
os-davidlourenco deleted the ROU-13034 branch September 11, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants