Skip to content

Conversation

rahmanunver
Copy link
Contributor

Pull request type

New feature (non-breaking change which adds functionality)


Description

This PR implements multi-page select all functionality for the Datagrid2 widget, allowing users to select all items across multiple pages based on the current filter. The feature includes configurable batch processing, progress tracking, and cancellation support, similar to the existing Excel export functionality.

What should be covered while testing?

Small dataset (< buffer size): Should use immediate selection
Large dataset (>= buffer size): Should show progress dialog and batch processing
Unknown total count: Should fall back to per-page selection
Cancellation: Should properly cancel and restore state
Page restoration: Should return user to original page after selection
Filtered data: Should only select items matching current filter

@rahmanunver rahmanunver requested a review from a team as a code owner September 19, 2025 13:02
@rahmanunver rahmanunver force-pushed the wc-3027_dg2_multipage_selectall branch 2 times, most recently from 979dd4f to 688c166 Compare September 25, 2025 18:38
@iobuhov iobuhov force-pushed the wc-3027_dg2_multipage_selectall branch 3 times, most recently from cdee2cf to 253d090 Compare October 9, 2025 15:28
@iobuhov iobuhov force-pushed the wc-3027_dg2_multipage_selectall branch from a72742a to 692515b Compare October 15, 2025 15:29
type SpinnerLoaderProps = {
size?: "small" | "medium" | "large";
withMargins?: boolean;
fullWidth?: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we never use this prop anywhere

}

#{$root}-clear-selection {
#{$root}-btn-invisible {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not really invisible, it makes them look like a link, I would call it btn-link or something.


function Checkbox(props: { status: SelectionStatus; onChange: () => void; "aria-label"?: string }): React.ReactNode {
if (props.status === "unknown") {
console.error("Data grid 2: don't know how to render column checkbox with selectionStatus=unknown");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which scenario this happens?

import { createElement } from "react";
import { useDatagridRootScope } from "../helpers/root-context";

export const SelectAllBar = observer(function SelectAllBar(): React.ReactNode {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import ReactNode from "react". We disallowed global React.* namespace in out React 19 migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants