Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 0062ac1

Browse files
Ghislain BeaulacGhislain Beaulac
Ghislain Beaulac
authored and
Ghislain Beaulac
committed
rename local filter param useFormatterOuputToFilter for localization
1 parent 61031c3 commit 0062ac1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/examples/grid-localization.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class GridLocalizationComponent implements OnInit {
4444

4545
ngOnInit(): void {
4646
this.columnDefinitions = [
47-
{ id: 'title', name: 'Title', field: 'id', headerKey: 'TITLE', formatter: this.taskTranslateFormatter, sortable: true, minWidth: 100, filterable: true, params: { useFormatterToFilter: true } },
47+
{ id: 'title', name: 'Title', field: 'id', headerKey: 'TITLE', formatter: this.taskTranslateFormatter, sortable: true, minWidth: 100, filterable: true, params: { useFormatterOuputToFilter: true } },
4848
{ id: 'duration', name: 'Duration (days)', field: 'duration', headerKey: 'DURATION', sortable: true, minWidth: 100, filterable: true },
4949
{ id: 'start', name: 'Start', field: 'start', headerKey: 'START', formatter: Formatters.dateIso, minWidth: 100, filterable: true },
5050
{ id: 'finish', name: 'Finish', field: 'finish', headerKey: 'FINISH', formatter: Formatters.dateIso, minWidth: 100, filterable: true },

src/app/modules/angular-slickgrid/services/filter.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export class FilterService {
186186
}
187187

188188
// when using localization (i18n), we should use the formatter output to search as the new cell value
189-
if (columnDef.params && columnDef.params.useFormatterToFilter) {
189+
if (columnDef && columnDef.params && columnDef.params.useFormatterOuputToFilter) {
190190
const rowIndex = (dataView && typeof dataView.getIdxById === 'function') ? dataView.getIdxById(item.id) : 0;
191191
cellValue = columnDef.formatter(rowIndex, columnIndex, cellValue, columnDef, item);
192192
}

0 commit comments

Comments
 (0)