Skip to content
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 - dynamically changing list-items within a list causes existing filter and new list-items to be out of sync #10230

Closed
2 of 6 tasks
iyouth23 opened this issue Sep 5, 2024 · 2 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 5 A few days of work, definitely requires updates to tests. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality

Comments

@iyouth23
Copy link

iyouth23 commented Sep 5, 2024

Check existing issues

Actual Behavior

When a filter is applied to a calcite-list and the calcite-list-items within that list are modified, the resulting list-items that show up do not match what is expected based on the filterText.

Expected Behavior

The filter and the list-items within a calcite-list should always be in sync.

Reproduction Sample

https://codepen.io/iyouth66/pen/LYKMpbQ?editors=1000

Reproduction Steps

  • Open this codepen: https://codepen.io/iyouth66/pen/LYKMpbQ?editors=1000
  • Click "List 1" > a calcite-list should populate with three list-items > Now filter by "Avenir" > The list items filter properly so that only two items are showing > Now click "List 2", which changes the content of the calcite-list to four different list-items > the items don't show up > Now change "Avenir" to "Aveni" to trigger a filter change > The filtered items show up again.

Reproduction Version

Not a regression

Relevant Info

cc @driskull

Regression?

No response

Priority impact

impact - p1 - need for current milestone

Impact

Affects our font-picker in ArcGIS Online, which handles two filterable lists with unique content.

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Online

@iyouth23 iyouth23 added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Sep 5, 2024
@github-actions github-actions bot added ArcGIS Online Issues logged by ArcGIS Online team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone labels Sep 5, 2024
@geospatialem geospatialem added p - high Issue should be addressed in the current milestone, impacts component or core functionality estimate - 5 A few days of work, definitely requires updates to tests. and removed needs triage Planning workflow - pending design/dev review. labels Sep 16, 2024
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Sep 16, 2024
@driskull driskull added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Sep 19, 2024
driskull added a commit that referenced this issue Sep 25, 2024
)

**Related Issue:** #10230

## Summary

- updates Filter to emit `calciteFilterChange` when there are no
`filteredItems`
- Previously, when text was typed into the filter component but there
were no `items`, no event would be emitted.
- The doc says `Fires when the filter text changes.`. However, this was
not always the case if items were not present.
- This was problematic because you wouldn't get an event for filter text
changing unless there were items populated.
- If items were added later after a text input, you wouldn't have the
correct text to filter against.
-  updates the list to filter when list items are slotted in
- add test
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Sep 25, 2024
@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned driskull Sep 25, 2024
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Sep 25, 2024
@geospatialem
Copy link
Member

Verified with the Chromatic build:

verify-10230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 5 A few days of work, definitely requires updates to tests. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

4 participants