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

Commit 1b1274b

Browse files
Ghislain BeaulacGhislain Beaulac
authored andcommitted
feat(filter): add optional placeholder to multiple select
1 parent 84b9db7 commit 1b1274b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/app/modules/angular-slickgrid/filters/selectFilter.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ export class SelectFilter implements Filter {
154154
throw new Error(`[select-editor] The ngx-translate TranslateService is required for the Select Filter to work correctly`);
155155
}
156156

157+
// add placeholder when found
158+
this.defaultOptions.placeholder = this.columnDef && this.columnDef.filter && this.columnDef.filter.placeholder || '';
159+
157160
// always render the Select (dropdown) DOM element, even if user passed a "collectionAsync",
158161
// if that is the case, the Select will simply be without any options but we still have to render it (else SlickGrid would throw an error)
159162
const newCollection = this.columnFilter.collection || [];

0 commit comments

Comments
 (0)