Skip to content

[Feat]:Support sp-combobox to take both itemText and value, so that duplicate itemTexts can exist in the list #5910

@preethialuru

Description

@preethialuru

Code of conduct

  • I agree to follow this project's code of conduct.

Impacted component(s)

sp-combobox

Description of the requested feature

When there is a list of items, which has itemText and value. Currently, the combobox only supports the itemText to be sent to change event. So any handling needs to be done using itemText.

But is the list of items has duplicate items with same itemText and different value (uniqueId, in our case its projectId). In this case, we would need both itemText and value to be sent to the change event. So the handling can be done based on both the itemText and value, even if the itemText is same, we can use value as differentiator.

So the request here is to, expose an explicit selectedValue property would eliminate reliance on itemText uniqueness and provide a more reliable contract for downstream consumers.

Reference thread: https://cclight.slack.com/archives/CESK60MQD/p1764083843191409

Mockups or screenshots

No response

Implementation notes or ideas

No response

Would you like to track this issue in Jira?

  • Yes, please tell me the ticket number!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs discussionProposed UX or spec changes requiring discussion w/ internal teamNeeds more infoThis ticket needs more information from the filer.needs jira ticketIssue has yet to be imported to JiratriageAn issue needing triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions