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

feat: allSelectedRows and someSelectedRows should be more reliable #28577

Merged

Commits on Jul 19, 2023

  1. feat: allSelectedRows and someSelectedRows should be more reliable

    We took the decision to decouple the selection state from the data. This
    means that the selection state does not always stay in sync with the
    data, but the resulting output should be correct.
    
    In this case `allSeletedRows` and `someSelectedRows` were calculated
    based on the size of the selected rows which was wrong, because there
    can be outdated values in there. Updates the `useTableSelection` hook
    to make sure that those states reflect the what is in the data. This
    will cause extra computation (which is memoized) but there is no other
    way to maintain consistency.
    
    It might be possible to update `useSelection` accept the set of
    selectable items, but the extra computation will still need to be there.
    
    Fixes microsoft#28456
    ling1726 committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    4d2efff View commit details
    Browse the repository at this point in the history
  2. changefile

    ling1726 committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    ea3f5c0 View commit details
    Browse the repository at this point in the history
  3. don't use set iteration

    ling1726 committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    cf9f870 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. revert

    ling1726 committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    6da7bb1 View commit details
    Browse the repository at this point in the history