Skip to content

Commit

Permalink
Merge branch 'master' into Added-missing-filterWidgetBuilder-to-Pluto…
Browse files Browse the repository at this point in the history
…Column-and-onFilterSuffixTap
  • Loading branch information
stan-at-work committed Jan 11, 2025
2 parents a093683 + 0ab15d7 commit 8613526
Show file tree
Hide file tree
Showing 10 changed files with 1,149 additions and 1,124 deletions.
45 changes: 22 additions & 23 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -170,29 +170,28 @@ class _PlutoGridExamplePageState extends State<PlutoGridExamplePage> {
body: Container(
padding: const EdgeInsets.all(15),
child: PlutoGrid(
columns: columns,
rows: rows,
columnGroups: columnGroups,
onLoaded: (PlutoGridOnLoadedEvent event) {
stateManager = event.stateManager;
stateManager.setShowColumnFilter(true);
},
onChanged: (PlutoGridOnChangedEvent event) {
print(event);
},
configuration: const PlutoGridConfiguration(),
selectDateCallback: (PlutoCell cell, PlutoColumn column) async {
return showDatePicker(
context: context,
initialDate: PlutoDateTimeHelper.parseOrNullWithFormat(
cell.value,
column.type.date.format,
) ?? DateTime.now(),
firstDate: column.type.date.startDate ?? DateTime(0),
lastDate: column.type.date.endDate ?? DateTime(9999)
);
}
),
columns: columns,
rows: rows,
columnGroups: columnGroups,
onLoaded: (PlutoGridOnLoadedEvent event) {
stateManager = event.stateManager;
stateManager.setShowColumnFilter(true);
},
onChanged: (PlutoGridOnChangedEvent event) {
print(event);
},
configuration: const PlutoGridConfiguration(),
selectDateCallback: (PlutoCell cell, PlutoColumn column) async {
return showDatePicker(
context: context,
initialDate: PlutoDateTimeHelper.parseOrNullWithFormat(
cell.value,
column.type.date.format,
) ??
DateTime.now(),
firstDate: column.type.date.startDate ?? DateTime(0),
lastDate: column.type.date.endDate ?? DateTime(9999));
}),
),
);
}
Expand Down
3 changes: 2 additions & 1 deletion lib/src/manager/event/pluto_grid_row_hover_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class PlutoGridRowHoverEvent extends PlutoGridEvent {

@override
void handler(PlutoGridStateManager stateManager) {
bool enableRowHoverColor = stateManager.configuration.style.enableRowHoverColor;
bool enableRowHoverColor =
stateManager.configuration.style.enableRowHoverColor;

// only change current hovered row index
// if row hover color effect is enabled
Expand Down
Loading

0 comments on commit 8613526

Please sign in to comment.