-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Adding new props to the data editor for exposing grid selections #6028
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?
Adding new props to the data editor for exposing grid selections #6028
Conversation
Greptile OverviewGreptile SummaryThis PR adds comprehensive grid selection capabilities to the DataEditor component, enabling developers to track and control cell, row, and column selections through the Glide Data Grid library.
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant DataEditor
participant State
participant GlideDataGrid
User->>DataEditor: Clicks/selects cells/rows/columns
DataEditor->>GlideDataGrid: Selection event triggered
GlideDataGrid->>DataEditor: on_grid_selection_change(GridSelection)
DataEditor->>State: Updates grid_selection state variable
State->>DataEditor: Re-render with new grid_selection
DataEditor->>DataEditor: reconstructGridSelection(selection)
Note right of DataEditor: Converts Python dict to<br/>CompactSelection objects
DataEditor->>GlideDataGrid: Pass reconstructed GridSelection prop
GlideDataGrid->>User: Display updated selection state
|
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.
1 file reviewed, no comments
CodSpeed Performance ReportMerging #6028 will degrade performances by 3.5%Comparing Summary
Benchmarks breakdown
|
|
can you provide an example of using grid_selection and on_grid_selection_change? |
Add Grid Selection Props and Event Handler to DataEditor
This PR adds comprehensive grid selection capabilities to the DataEditor component, allowing developers to track and control cell, row, and column selections.
New Props Added:
Selection Control:
range_select: Controls range selection modes ("none", "cell", "rect", "multi-cell", "multi-rect")
column_select: Already existed, allows column selections ("none", "single", "multi")
row_select: Controls row selection modes ("none", "single", "multi")
Selection Blending:
range_selection_blending: Controls how range selections coexist ("exclusive", "mixed")
column_selection_blending: Controls how column selections coexist ("exclusive", "mixed")
row_selection_blending: Controls how row selections coexist ("exclusive", "mixed")
Selection Behavior:
span_range_behavior: Controls how cell spans are handled in selections ("default", "allowPartial")
State Management:
grid_selection: Controlled state prop for the current selection (columns, rows, and current cell/range)
on_grid_selection_change: Event handler that fires when selection changes, passing the current GridSelection object
All Submissions:
Type of change
Please delete options that are not relevant.
New Feature Submission: