-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
An issue occurs when adding a new row into the Group Type #1120
Comments
Please rephrase this issue ! |
This is my column this is example tree structure grouping for the row
I want to add new items to an initialized children list when the collapsed toggle is expanded.
but there are an error occurs when add item
Cannot hit test a render box that has never been laid out. The hitTest() method was called on this RenderBox: RenderErrorBox#ea9ef NEEDS-LAYOUT NEEDS-PAINT If you are trying to perform a hit test during the layout phase itself, make sure you only hit test nodes that have completed layout (e.g. the node's children, after their layout() method has been called). When the exception was thrown, this was the stack: |
This is my Columns
`columns.addAll([
PlutoColumn(
title: "Directory",
field: "files",
readOnly: true,
type: PlutoColumnType.text(),
renderer: (c) {
When The Row is expanded will load the data from api
and insert into the Row Group children
`
PlutoGrid(
columns: columns,
rows: rows,
configuration: PlutoGridConfiguration(
scrollbar: PlutoGridScrollbarConfig(
dragDevices: {
PointerDeviceKind.touch,
PointerDeviceKind.stylus,
PointerDeviceKind.invertedStylus,
PointerDeviceKind.unknown,
},
),
style: PlutoGridStyleConfig(
enableCellBorderVertical: false,
cellColorGroupedRow: Color(0x80F6F6F6),
gridBorderRadius: BorderRadius.circular(8.0),
columnAscendingIcon: const Icon(FontAwesomeIcons.arrowDown),
columnDescendingIcon: const Icon(FontAwesomeIcons.arrowUp),
),
columnSize: const PlutoGridColumnSizeConfig(
autoSizeMode: PlutoAutoSizeMode.scale,
),
),
onLoaded: (e) {
stateManager = e.stateManager;
e.stateManager.setRowGroup(
PlutoRowGroupTreeDelegate(
resolveColumnDepth: (column) => e.stateManager.columnIndex(column),
showText: (cell) => true,
showFirstExpandableIcon: true,
showCount: false,
onToggled: ({required bool expanded, required PlutoRow row}) async {
if (!expanded) return;
},
);
`
The Error Occurs
errors.dart:294 Uncaught (in promise) DartError: Assertion failed: file:///C:/Users/User/AppData/Local/Pub/Cache/hosted/pub.dev/pluto_grid-7.0.2/lib/src/model/pluto_cell.dart:107:5
flag
"PlutoCell is not initialized.When adding a column or row, if it is not added through PlutoGridStateManager, PlutoCell does not set the necessary information at runtime.If you add a column or row through PlutoGridStateManager and this error occurs, please contact Github issue."
at Object.throw_ [as throw] (errors.dart:294:3)
at Object.assertFailed (errors.dart:35:3)
at Object._assertUnInitializedCell (pluto_cell.dart:107:9)
at get row (pluto_cell.dart:42:5)
at pluto_row_group_delegate.PlutoRowGroupTreeDelegate.new.isExpandableCell (pluto_row_group_delegate.dart:173:14)
at pluto_base_cell._CellContainerState.new.updateState (pluto_base_cell.dart:199:26)
at [_onChange] (pluto_state_with_change.dart:110:5)
at _RootZone.runUnaryGuarded (zone.dart:1594:9)
at [_sendData] (stream_impl.dart:339:5)
at [_add] (stream_impl.dart:271:7)
at [_add] (stream_pipe.dart:123:11)
at [_handleData] (stream_pipe.dart:195:11)
at [_handleData] (stream_pipe.dart:153:5)
at _RootZone.runUnaryGuarded (zone.dart:1594:9)
at [_sendData] (stream_impl.dart:339:5)
at _DelayedData.new.perform (stream_impl.dart:515:13)
at _PendingEvents.new.handleNext (stream_impl.dart:620:10)
at async._AsyncCallbackEntry.new.callback (stream_impl.dart:591:7)
at Object._microtaskLoop (schedule_microtask.dart:40:11)
at _startMicrotaskLoop (schedule_microtask.dart:49:5)
at async_patch.dart:181:7
The text was updated successfully, but these errors were encountered: