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

add support for bulk deletion of rows #1291

Merged
merged 8 commits into from
Sep 8, 2023
Merged

Commits on Aug 22, 2023

  1. Configuration menu
    Copy the full SHA
    17369b4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9ca59c8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    febe46c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9b5c2e3 View commit details
    Browse the repository at this point in the history
  5. disable row selection for array sub table page

    Row selection has been disabled because bulk delete functionality
    cannot work for array sub table according to the current implementation.
    
    Bulk delete problem:
    
    Suppose we have an array with values `[a, b, c]`. Suppose, the indexes
    to be removed are [1, 2]. The UI asks firebase function to remove index
    1. After 1, the UI asks index 2 to be deleted but index 2 doesn't exist.
    After deletion of index 1, the array is `[a, c]`.
    il3ven committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    3d45e34 View commit details
    Browse the repository at this point in the history
  6. make enableRowSelection optional and false by default

    `enableRowSelection` was introduced in the last commit.
    
    As of this commit row selection is enabled for TablePage and
    SubTablePage.
    il3ven committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    3223ae9 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2023

  1. change logic to determine state of checkbox in header row

    If there are 1000 rows and we have rendered 100 then select all will
    only select 100. In this case, technically all rows in react-table are
    selected but we should not show the checked state. It leads to bad UX.
    Indermediate would be better.
    
    Also, split the additions of row selection column into a new useMemo. This
    ensures that if a row is selected we are only re-calculating the row
    selection column and not all.
    il3ven committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    f087105 View commit details
    Browse the repository at this point in the history
  2. fix css of CheckboxIndeterminateIcon

    Due to wrong CSS we were not able to see the icon.
    il3ven committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5936f13 View commit details
    Browse the repository at this point in the history