-
Notifications
You must be signed in to change notification settings - Fork 75
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
feat(list): add filterProps property to specify which properties to filter against #9622
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝
📝🏑📝📝📝🏑📝📝🏑🏑📝📝🏑🏑🏑📝📝🏑🏑🏑📝🏑🏑🏑🏑📝🏑📝
📝🏑🏑📝📝🏑📝🏑📝📝🏑📝📝🏑📝📝🏑📝📝📝📝🏑📝📝📝📝🏑📝
📝🏑📝🏑📝🏑📝🏑📝📝🏑📝📝🏑📝📝🏑📝📝📝📝🏑🏑🏑📝📝🏑📝
📝🏑📝📝🏑🏑📝🏑📝📝🏑📝📝🏑📝📝🏑📝📝📝📝🏑📝📝📝📝📝📝
📝🏑📝📝📝🏑📝📝🏑🏑📝📝🏑🏑🏑📝📝🏑🏑🏑📝🏑🏑🏑🏑📝🏑📝
📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝📝
const list = await page.find("calcite-list"); | ||
list.setProperty("matchFields", ["label", "description"]); | ||
await page.waitForChanges(); | ||
await page.waitForTimeout(listDebounceTimeout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an event we can listen for? This is fine for now, but we should start moving away from timeouts as puppeteer@22.2.0
removed page.waitForTimeout
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not currently, we would need some kind of event for when filteredItems is updated. Can you create an issue to add this so we can clean up these tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -160,6 +160,16 @@ export class List | |||
*/ | |||
@Prop({ reflect: true }) loading = false; | |||
|
|||
/** | |||
* Specifies the fields to match against when filtering. If not set, all fields will be matched (label, description, metadata, value). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, late to the party here - is "fields" an obvious term here for this? "If not set, all fields will be matched (label, description, metadata, value)"
Really it's matching supplied property values? Feel free to disregard but "fields" doesn't immediately convey what will be matched to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already called the property matchFields
on filter.tsx
but we can change before we release if we have a beter name. matchPropertyValues
or matchKeyValues
? I think its really a key. Could also be matchKeys
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kinda like filterProps
. // the properties to use for filtering? @macandcheese? @jcfranco
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will likely need to update the changelog at release to modify matchFields to filterProps on the filter component.
…rovements * origin/dev: build(deps): update typescript-eslint monorepo to v7.13.1 (#9657) docs: update component READMEs (#9668) chore: release next chore: minor git tooling tweaks (#9664) feat(combobox): add `filterText` prop (#9654) chore: release next feat(list): add filterProps property to specify which properties to filter against (#9622) chore: release next fix(list): enable dragging on list items contained within a list that supports dragEnabled (#9660) test(filter): add coverage for empty filter text (#9655) chore: release next fix: set the correct Sortable parent when within a shadowRoot (#9532) fix(combobox): allow arrow selection of entered text (#9629)
Related Issue: #9619
Summary
matchFields
tofilterProps
on the filter component.