Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 22, 2025

When a parameter has predefined options but allows manual entry (the default behavior), custom values that don't match any predefined option would display "undefined" in the parameter chip instead of just the value.

Before:
Before fix showing undefined

After:
The chip now shows [1] instead of [1] undefined when no text label is available.

Root Cause:
The issue was in the itemText() method in ValueId.vue. When selectedItem was null for custom values, the method would try to format the display as [${item.value}] ${item.text}. When item.text was undefined, it would literally display "undefined" in the UI.

Solution:
Modified the itemText() method to only include the text portion when item.text is defined:

// Only show the text part if it exists and is not undefined
const textPart = item.text !== undefined ? ` ${item.text}` : ''
return `[${item.value}]${textPart}${defaultIndicator}`

This ensures clean display of custom parameter values while maintaining full backward compatibility for parameters with proper text labels.

Fixes #4354.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 224.0.0.251
  • stats.zwave-js.io
    • Triggering command: node --preserve-symlinks server/bin/www.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Parameters with options and manual entry show "undefined" for values that aren't explicitly included in options fix(ui): prevent "undefined" text in parameter chips with manual entry Sep 22, 2025
@Copilot Copilot AI requested a review from robertsLando September 22, 2025 10:17
Copilot finished work on behalf of robertsLando September 22, 2025 10:17
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.

Parameters with options and manual entry show "undefined" for values that aren't explicitly included in options
2 participants