Skip to content
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

Added missing parameter filterWidgetBuilder and onFilterSuffixTap #125

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stan-at-work
Copy link

@stan-at-work stan-at-work commented Dec 17, 2024

This fixes: #121

This adds:

  • Missing parameter: filterWidgetBuilder added to customize a pluto column filter.
  • Added clearIcon and onClear, if onClear is used then a clear icon shows in the textfield
  • Added filterWidgetDelegate, the filterWidgetDelegate is a delegate that has 2 contrcutors.
  /// This is the default filter widget delegate
  const PlutoFilterColumnWidgetDelegate.textField({
    this.filterHintText,
    this.filterHintTextColor,
    this.filterSuffixIcon,
    this.onFilterSuffixTap,
    this.clearIcon = const Icon(Icons.clear),
    this.onClear,
  }) : filterWidgetBuilder = null;

  /// If you don't want a custom widget
  const PlutoFilterColumnWidgetDelegate.builder({
    this.filterWidgetBuilder,
  })  : filterSuffixIcon = null,
        onFilterSuffixTap = null,
        filterHintText = null,
        filterHintTextColor = null,
        clearIcon = const Icon(Icons.clear),
        onClear = null;

Those parameters are removed from the PlutoColumn class and replaced by a filterWidgetDelegate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Filters on columns - add x clear button to filter textfield.
1 participant