Skip to content

fix: keep string tag values on HTML select labels - #2525

Merged
unocelli merged 1 commit into
frangoteam:masterfrom
sankalpsthakur:fix/2493-select-string-labels
Sep 10, 2026
Merged

fix: keep string tag values on HTML select labels#2525
unocelli merged 1 commit into
frangoteam:masterfrom
sankalpsthakur:fix/2493-select-string-labels

Conversation

@sankalpsthakur

Copy link
Copy Markdown
Contributor

📌 Description

Select labels went blank when the bound tag was a string. parseFloat then Number both yield NaN, so select.value never matched an option. Fall back to the raw signal value after those coercions fail.

  • What problem does this solve? String-valued select options show no selected label.
  • What was changed? HtmlSelectComponent.processValue keeps non-numeric string values.
  • Why is this needed? Number/boolean tags still work; strings were dropped.

🧪 Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Other

🚫 Build Artifacts Check

  • I did NOT commit /client/dist
  • I did NOT commit generated Angular build output
  • Only source files are included

🔍 Checklist

  • Code follows project coding standards
  • I tested my changes locally
  • Documentation updated if required
  • Issue opened (for major changes)

Fixes #2493

AI/LLM disclosure

  • AI coding tools (including Grok and/or Codex agent-assisted editing) were used to help draft or modify code and this PR description.
  • I reviewed the complete change, understand the reasoning, and ran the reported local tests before submitting.
  • This submission is original work of authorship under the project CLA / contributor terms; AI output was not pasted unreviewed.

📝 Additional Notes

Local check: parseFloat('idle') / Number('idle') are NaN; raw 'idle' is kept. Numeric tags still go through toFixed(5).

Made with Cursor

parseFloat/Number both yield NaN for non-numeric strings, so the selected
option label was blank. Fall back to the raw signal value.
@unocelli

Copy link
Copy Markdown
Member

Hi @sankalpsthakur Good job, Thanks a lot!

@unocelli
unocelli merged commit 99be78e into frangoteam:master Sep 10, 2026
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.

[BUG] Select component, does not display the label when the type is string

2 participants