GithubHelp home page GithubHelp logo

Comments (3)

Acacio2000 avatar Acacio2000 commented on June 15, 2024 1

See: https://github.com/bosskmk/pluto_grid/blob/master/demo/lib/screen/feature/column_filtering_screen.dart
ClassYouImplemented

In this my example to every text fields use custom filter and CaseInsensitive
I converted every text fields to UPPER
Use COMMA to separate words: Ex: "A,B" "B,C" in any order: "A,B" = "B,A"

String toUpperCaseWithoutAccents(String input) {
input = removeDiacritics(input).trim().toUpperCase();
return input;
}

class ClassFilterContainAllWords implements PlutoFilterType {
const ClassFilterContainAllWords();
@OverRide
get compare => ({
required String? base,
required String? search,
required PlutoColumn? column,
}) {
if (search != null) {
search = toUpperCaseWithoutAccents(search);
}
var keys = search!.split(',').map((e) => e.trim().toUpperCase()).toList();
return keys.every((key) => base!.toUpperCase().contains(key));
};
@OverRide
String get title => 'Custom filter';
}

columnFilter: PlutoGridColumnFilterConfig(
filters: const [
...FilterHelper.defaultFilters,
ClassFilterContainAllWords(),
],
resolveDefaultColumnFilter: (column, resolver) {
if (column.type is PlutoColumnTypeText) {
return resolver() as PlutoFilterType;
}
return resolver() as PlutoFilterType;
},
),

image

image

from pluto_grid.

github-actions avatar github-actions commented on June 15, 2024

This issue is stale because it has been open for 30 days with no activity.

from pluto_grid.

github-actions avatar github-actions commented on June 15, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

from pluto_grid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.