jpmorganchase / salt-ds

React UI components built with a focus on accessibility, customisation and ease-of-use
https://www.saltdesignsystem.com
Apache License 2.0
109 stars 78 forks source link

Docs: Combo box > Empty Message example: is not empty #3632

Closed j5v closed 4 days ago

j5v commented 6 days ago

Package name(s)

Core (@salt-ds/core)

Package version(s)

(current, 2024-06-24)

Description

Edit: this bug report is based on a misunderstanding of when the 'empty message' appears. In further comments, I've instead asked for a fuller description, to avoid confusion with 'empty list' or 'no selection' design patterns. Obsolete report as follows:

The example for Combo Box > Empty Message shows a populated set of options. I think you intended to provide an empty list in the example. https://www.saltdesignsystem.com/salt/components/combo-box/examples#empty-message.

The code loads a list of options from import { shortColorData } from "./exampleData"; but it should instead use none.

Steps to reproduce

  1. Go to https://www.saltdesignsystem.com/salt/components/combo-box/examples#empty-message

Expected behavior

The message No results found for "{value}" is (formatted and) displayed.

Operating system

Browser

Are you a JPMorgan Chase & Co. employee?

origami-z commented 6 days ago

The current behavior that the empty message will be displayed when filtering with no match. Will discuss with the team what's the best alternative

j5v commented 6 days ago

The current behavior that the empty message will be displayed when filtering with no match. With discuss with the team what's the best alternative

Thanks @origami-z for the clarification. Perhaps this bit needs a change, to reflect that the message is intended for filtered results:

Empty message

Use the Option component to display a message when there are no options available.

mark-tate commented 5 days ago

Goal : XS(1)

Pickup based on availability of developer