forked from doonfrs/pluto_grid_plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request doonfrs#111 from stan-at-work/issue-105
Issue 105
- Loading branch information
Showing
5 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
lib/src/manager/event/pluto_grid_clear_columns_filter_event.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:pluto_grid_plus/pluto_grid_plus.dart'; | ||
|
||
/// Event to clear the provided columns there filter | ||
class PlutoGridClearColumnsFilterEvent extends PlutoGridEvent { | ||
final Iterable<PlutoColumn>? columns; | ||
final int? debounceMilliseconds; | ||
final PlutoGridEventType? eventType; | ||
|
||
PlutoGridClearColumnsFilterEvent({ | ||
this.columns, | ||
this.debounceMilliseconds, | ||
this.eventType, | ||
}) : super( | ||
type: eventType ?? PlutoGridEventType.normal, | ||
duration: Duration( | ||
milliseconds: debounceMilliseconds?.abs() ?? | ||
PlutoGridSettings.debounceMillisecondsForColumnFilter), | ||
); | ||
|
||
@override | ||
void handler(PlutoGridStateManager stateManager) { | ||
stateManager.setFilterWithFilterRows([]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters