mazdik/ng-mazdik

Default filter in CRUD table on first load

hghew opened this issue · 2 comments

hghew commented

Hi mazdik, is that possible to set certain column to be filtered when first load?
for example, the crud table has 5 columns, 1 column with selection Active / Inactive, when first loading on the crud table, I would like to show Active (selected as filter value for that column)

Thanks.

try

this.settings.initLoad = false;
this.dataManager = new DataManager(this.columns, this.settings, service);

this.dataManager.dataFilter.setFilter(value, 'race', FilterOperator.EQUALS);
this.dataManager.events.onFilter();
``
hghew commented

try

this.settings.initLoad = false;
this.dataManager = new DataManager(this.columns, this.settings, service);

this.dataManager.dataFilter.setFilter(value, 'race', FilterOperator.EQUALS);
this.dataManager.events.onFilter();
``

thanks, it works
I tried without this.settings.initLoad = false;