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

calcite-list selectedItem incorrect when unselecting all via code #7202

Closed
jgrayson-apl opened this issue Jun 20, 2023 · 3 comments
Closed
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - high Issue should be addressed in the current milestone, impacts component or core functionality

Comments

@jgrayson-apl
Copy link

Actual Behavior

the calciteList.selectedItem property is incorrect when we unselect all list items via code

Expected Behavior

I would expect the CalciteList.selectedItem property to be an empty list if there are no selected list items

Reproduction Sample

https://codepen.io/john-grayson/pen/poQbMpe

Reproduction Steps

  1. select items in list to verify in the console that selecting/unselecting works correctly if interacting directly with list via list items
  2. click the top 'Clear Selection' button
  3. notice that the selectedItem property still contains the previous selected items
  4. click button again to verify that the selectedItem property is still incorrect

Reproduction Version

1.4.2

Relevant Info

No response

Regression?

No response

Priority impact

p4 - not time sensitive

Impact

No response

Esri team

N/A

@jgrayson-apl jgrayson-apl 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 Jun 20, 2023
@github-actions github-actions bot added the impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive label Jun 20, 2023
@driskull driskull self-assigned this Jun 20, 2023
@driskull driskull added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Jun 20, 2023
@driskull driskull added this to the 2023 June patch priorities milestone Jun 20, 2023
@driskull
Copy link
Member

Nice find @jgrayson-apl 👍

@geospatialem geospatialem added p - high Issue should be addressed in the current milestone, impacts component or core functionality and removed needs triage Planning workflow - pending design/dev review. labels Jun 21, 2023
driskull added a commit that referenced this issue Jun 21, 2023
#7204)

**Related Issue:** #7202

## Summary

- Updates `selectedItems` when an item's selection is toggled.
- Fixes current logic which depends on value being `true`.
- Adds test coverage
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Jun 21, 2023
@github-actions github-actions bot assigned geospatialem and unassigned driskull Jun 21, 2023
@github-actions
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 Jun 26, 2023
@geospatialem
Copy link
Member

Verified in 1.5.0-next.4 without the workaround of list.selectedItems = [];

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. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

3 participants