Skip to content

Instantly share code, notes, and snippets.

@MasterHans
Created October 26, 2021 13:30
Show Gist options
  • Save MasterHans/72e23b8ad1a5e0502caf2a94d18192d0 to your computer and use it in GitHub Desktop.
Save MasterHans/72e23b8ad1a5e0502caf2a94d18192d0 to your computer and use it in GitHub Desktop.
Add filter to grid through the FrontEnd
_.set(c.possibleCountries.filter, ['filters', 'groupOp'], 'AND');
//exclude selected countries
_.set(c.possibleCountries.filter, ['filters', 'rules', 'id'], {
field: 'id',
op: 'ni',
data: c.model.countriesTypeIds
});
//set filter on EU countries
_.set(c.possibleCountries.filter, ['filters', 'rules', 'typeId'], {
field: 'typeId',
op: 'eq',
data: 2
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment