Skip to content

Commit 5aafd31

Browse files
Remove all enable_range_selection references from AG Grid cell selection docs
- Remove invalid enable_range_selection prop from all examples - Update documentation to reflect that range selection is automatic with cell_selection=True - Address GitHub comment feedback from Lendemor on PR #1543 - Ensure all examples use only valid AG Grid props Co-Authored-By: [email protected] <[email protected]>
1 parent 1487c1d commit 5aafd31

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

docs/enterprise/ag_grid/cell-selection.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def basic_cell_selection():
6363

6464
## Range Selection
6565

66-
For more advanced cell selection features like fill handle, you need to enable range selection by setting `enable_range_selection=True`. This allows users to select multiple cells at once and perform operations across ranges.
66+
Range selection is automatically enabled when you set `cell_selection=True`. This allows users to select multiple cells at once and perform operations across ranges.
6767

6868
```python demo exec
6969
import reflex as rx
@@ -108,7 +108,6 @@ def range_selection_example():
108108
column_defs=editable_column_defs,
109109
row_data=RangeSelectionState.data,
110110
cell_selection=True,
111-
enable_range_selection=True,
112111
on_cell_selection_changed=RangeSelectionState.handle_selection,
113112
width="100%",
114113
height="300px",
@@ -134,7 +133,7 @@ cell_selection={
134133
}
135134
```
136135

137-
**Note:** While `enable_range_selection=True` enhances fill handle functionality by allowing range selection, it is not required for basic fill handle operations.
136+
**Note:** Range selection is automatically enabled with `cell_selection=True` and works seamlessly with fill handle operations.
138137

139138
### Fill Handle Events
140139

@@ -192,7 +191,6 @@ def fill_handle_example():
192191
"mode": "fill", # Enable fill handle
193192
}
194193
},
195-
enable_range_selection=True,
196194
on_cell_value_changed=FillHandleState.handle_cell_change,
197195
width="100%",
198196
height="300px",
@@ -259,7 +257,6 @@ def advanced_selection_example():
259257
"mode": "fill",
260258
}
261259
},
262-
enable_range_selection=True,
263260
enable_cell_text_selection=True, # Allow text selection within cells
264261
suppress_cell_focus=False, # Allow cell focus
265262
width="100%",
@@ -272,16 +269,15 @@ def advanced_selection_example():
272269

273270
## Key Features
274271

275-
- **Cell Selection**: Enable with `cell_selection=True` for basic cell selection
276-
- **Range Selection**: Use `enable_range_selection=True` for multi-cell selection
272+
- **Cell Selection**: Enable with `cell_selection=True` for basic cell selection and automatic range selection
277273
- **Fill Handle**: Configure with `cell_selection={"handle": {"mode": "fill"}}` for drag-to-fill functionality
278274
- **Event Handling**: Use `on_cell_selection_changed` to respond to selection changes
279275
- **Value Changes**: Use `on_cell_value_changed` to handle individual cell edits and fill operations
280276
- **Text Selection**: Enable `enable_cell_text_selection=True` to allow text selection within cells
281277

282278
## Best Practices
283279

284-
1. **Consider range selection for enhanced functionality**: While `enable_range_selection=True` is not required for fill handle, it provides additional selection capabilities that complement fill operations.
280+
1. **Use cell_selection configuration**: Range selection is automatically enabled with `cell_selection=True` and provides all necessary selection capabilities for fill operations.
285281

286282
2. **Handle cell value changes**: When using fill handle, implement `on_cell_value_changed` to process the data updates in your backend.
287283

0 commit comments

Comments
 (0)