Skip to content

DM-2874: Prevent empty entries in SuperCombo#155

Open
dariodjuric wants to merge 2 commits into
milojs:masterfrom
dariodjuric:fix/DM-2874-prevent-empty-entries
Open

DM-2874: Prevent empty entries in SuperCombo#155
dariodjuric wants to merge 2 commits into
milojs:masterfrom
dariodjuric:fix/DM-2874-prevent-empty-entries

Conversation

@dariodjuric

@dariodjuric dariodjuric commented Jul 3, 2026

Copy link
Copy Markdown

Resolves: DM-2874

Fixed a bug where an empty entry could be added in the type-and-add dropdowns: after typing a name and then clearing it, the "Add" button could reappear and, when clicked, save a blank entry. Now the field ignores empty or whitespace-only input, and the "Add" option no longer shows up once the box has been cleared.

Comment thread dist/milo_ui.bundle.js
moveItem: MLFormList$moveItem,
setItemSchema: MLFormList$setItemSchema,
destroy: MLFormList$destroy
destroy: MLFormList$destroy,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these changes in /dist were auto-generated, please let me know if I should exclude them? I see some previous commits have also included /dist.

@dariodjuric dariodjuric marked this pull request as ready for review July 3, 2026 08:18
@gennady-verbitsky gennady-verbitsky requested a review from Copilot July 3, 2026 16:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a bug in SuperCombo where clearing a previously-typed value could still allow an empty entry to be added via the “Add” button, by ensuring empty/whitespace-only input doesn’t surface the Add UI state and cannot be submitted.

Changes:

  • Reset the internal “show Add on click” state when the input becomes empty, preventing the Add button from reappearing after clearing.
  • Trim and validate the Add button payload so blank/whitespace-only labels are not posted.
  • Update built dist/* artifacts to reflect the source changes (note: the dist bundle also includes additional non‑SuperCombo code changes).

Reviewed changes

Copilot reviewed 1 out of 4 changed files in this pull request and generated no comments.

File Description
lib/components/SuperCombo.js Prevents Add-button reappearance after clearing input; trims/blocks empty labels on add.
dist/milo_ui.min.js Rebuilt minified output reflecting the updated component behavior.
dist/milo_ui.bundle.js Rebuilt bundle reflecting SuperCombo updates; also includes additional unrelated module changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants