-
Notifications
You must be signed in to change notification settings - Fork 55
[WC-3027] Add Multi-Page Select All functionality to Datagrid #1906
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
base: main
Are you sure you want to change the base?
Conversation
979dd4f
to
688c166
Compare
cdee2cf
to
253d090
Compare
a72742a
to
692515b
Compare
type SpinnerLoaderProps = { | ||
size?: "small" | "medium" | "large"; | ||
withMargins?: boolean; | ||
fullWidth?: boolean; |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
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