-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(list): only filter by list item content #9569
Conversation
@jcfranco the reason I think this was unintentional is because...
Thoughts? If you disagree, I will add |
This is a great discussion since the original issue only focused on the
Let's proceed with this at the moment. I disagree on changing this behavior at this moment. We don't have data to make this call confidently and users have always been able to filter by value. If we make it a pattern for filter-owning components to define a Does the following match the approach we're going with? Users use Pros
Cons
|
I'll proceed with creating a matchFields on list. However, I still strongly feel that we should make it a pattern to only be filtering by visible content by default. value isn't visible anywhere nor content. |
Won't |
No because metadata isn't defined by default. My argument is that we shouldn't be filtering using value by default since it is not anything visible to the end user. |
Putting the default aspect aside, you have a concern about matching non-visible values being confusing. This could still look/behave the same way to users, right? |
No, I don't have any concern about matching non visible content if a user set metadata since that is what that property is for. Its for providing additional matching. My concern is just about the default experience of matching against value since value is not content. Its an identifier which in most cases isn't search worthy. I think in more cases than not, a user will need to set Whatever we decide, it will become a pattern because we're also searching value in components like combobox. I just don't get how searching value by default is good in cases like this: <calcite-combobox>
<calcite-combobox-item value="8fd5d99a-100d-4800-8e88-f29a5477c559" text-label="Natural Resources"></calcite-combobox-item>
<calcite-combobox-item value="3e8f074e-2d88-48bf-b669-22047777a603 " text-label="Agriculture"></calcite-combobox-item>
</calcite-combobox> It means if someone enters the character "f" or "d" its going to match to both those items for no good reason. |
I see your point and that's a great example, but I can also see use cases using the value directly. Like I mentioned above, we can revisit this for a breaking change release and after getting feedback from teams. |
I don't see this use case as valid. If a user wants to add additional search matching, they can use metadata instead. The purpose of value is for a unique identifier for the item which may be used for form submission or apps/components to identify the selected values.
Sounds good to me. Doing this during a breaking change would be beneficial. |
Related Issue: #5063
Summary