-
Notifications
You must be signed in to change notification settings - Fork 77
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
[List / List items] Support custom filtering supporting a filter function with a prop #6544
Comments
Scheduling time with FieldApps to understand use case in more depth, will add priority and estimate after discussion |
Added some stripped-down filtering behavior to the issue description that should also be part of any discussion. |
Reallocating to the May release for design considerations. |
Propose we model the changes to List selection behaviors after what is outlined in issue #6912 for Tree. This likely means adding a |
Selection modesFinal proposal for revising the existing FilteringSince the parent would still be selectable in For the revised
Nested indentation levelsWith these new/revised selection modes, nested indentation behavior should be reconsidered as part of issue #6632. @nwhittaker, let me know if we've missed anything here. |
Naming is hard 😅 - was trying to think of a way we could add |
A predicate function is one that always returns |
@geospatialem @DitwanP Should the custom filter function require that The other question is should |
Actually, I think i like the |
Also lean towards not having a defined
Maybe we should lean towards supporting it regardless of |
Agreed. In the future, we should still allow |
Installed and assigned for verification. |
Verified with const listEl = document.getElementById("custom-list");
listEl.filterPredicate = (item) => {
if (listEl.filterText === "test") {
return true;
}
return item.value === "item2";
}; |
**Related Issue:** #6544 ## Summary docs(list): make filterPredicate property optional. BEGIN_COMMIT_OVERRIDE END_COMMIT_OVERRIDE
**Related Issue:** #6544 ## Summary docs(list): make filterPredicate property optional. BEGIN_COMMIT_OVERRIDE END_COMMIT_OVERRIDE
Description
A way to opt in to an stripped-down behavior when clicking a list-item that contains nested list-items.
Originally included selection and filtering asks, now placed in two separate issues:
open
without selection change and event dispatch #8515Acceptance Criteria
Filtering a list of items with nested list-items:
Relevant Info
No response
Which Component
calcite-list-item
Example Use Case
The Field Maps web app would like to use the calcite-list element to display the layers in a map. For group layers, nested layers are shown as child list-items.
Selecting a leaf layer navigates the app for further handling of the layer. However, the app does not provide further handling for group layers. They are treated more like folders that organize sets of layers -- so clicking them in the list should have no effect other than to drill down to leaf layers.
Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: