Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Re-re-templating/reuse igx-gid filters (igxFilterCellTemplate)
posted

Hey guys,

according to

https://es.infragistics.com/products/ignite-ui-angular/angular/components/grid/filtering#re-templating-filter-cell

   <ng-template #defaultFilterTemplate igxFilterCellTemplate let-column="column">
        <div class="filter-cell">
            <igx-input-group #inputGr class="filter-input" type="box" [displayDensity]="'compact'">
                <igx-prefix>
                    <igx-icon>search</igx-icon>
                </igx-prefix>
                <input
                    #input
                    igxInput
                    tabindex="0"
                    placeholder="Filter..."
                    autocomplete="off"
                    [value]="getFilterValue(column)"
                    (input)="onInput(input, column)"
                    (click)="onClick(inputGr)"
                    (keydown)="onKeyDown($event)"/>
                <igx-suffix *ngIf="input.value || input.value === 0" (click)="clearInput(column)" tabindex="0">
                    <igx-icon>clear</igx-icon>
                </igx-suffix>
            </igx-input-group>
        </div>
    </ng-template>

we already re-templated some filters and it's working so far. But we have plenty of grids that should use the same kind of filters => Can it be reused without copy-paste? An own component or something like that?