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

[Table / Table Row] Programmatically setting selected on Table Rows does not update Table's selection UI #11142

Open
2 of 6 tasks
macandcheese opened this issue Dec 24, 2024 · 0 comments
Labels
0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. c-table Issues that pertain to the calcite-table and related components Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone needs triage Planning workflow - pending design/dev review.

Comments

@macandcheese
Copy link
Contributor

Check existing issues

Actual Behavior

When programmatically selecting or deselecting Table Rows - the Table "selection UI" will not update (the counts shown in Chips, or the "select all" icon / cell in the Table until the component is interacted with and a re-render occurs.

Expected Behavior

I'd expect the Table to update when Table Row's selected state is updated programmatically.

Reproduction Sample

https://codepen.io/mac_and_cheese/pen/mybwRNV?editors=1000

Reproduction Steps

  1. Go to Codepen.
  2. Note that items are pre-selected.
  3. Use the Button to programmatically de-select the Rows.
  4. Notice the Table Row display updates, but the Table "count chips" and "selection icon / cell" do not.
  5. Uncomment the workaround
  6. Use the button again to see expected behavior.

Reproduction Version

2.13.2

Relevant Info

No response

Regression?

No response

Priority impact

impact - p2 - want for an upcoming milestone

Impact

A workaround is to "reset" the selectionMode property programmatically which will cause a re-render, and the counts and display to update correctly.

Calcite package

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

Esri team

Calcite (design)

@macandcheese macandcheese added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Dec 24, 2024
@github-actions github-actions bot added Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Dec 24, 2024
@macandcheese macandcheese added the c-table Issues that pertain to the calcite-table and related components label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. c-table Issues that pertain to the calcite-table and related components Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

1 participant