Unplanned
Last Updated: 31 Oct 2024 09:59 by Dominik
Kendo UI
Created on: 27 Jan 2022 09:20
Category: Grid
Type: Feature Request
3
Create additional filters that have no filter value

As the FilterInputWrapperComponents set currentOperator(value: string) uses a hard coded list of operator values (isnull isempty isnotnull isnotemty), it is impossible to create a custom FilterOperator that has no search string - so we can't have isnullorempty isnotnullorempty (or isblank/isnotblank).

Please introduce a requiresSearchValue on the FilterOperatorBase class and make sure FilterInputWrapperComponents does decisions based on that.

Please introduce a isnullorempty/isnotnullorempty filter operator (for strings).

Additional context/sample usage:


 <kendo-grid-column title="Employee / Prospect" field="Name" width="160">
            <ng-template kendoGridCellTemplate let-field let-value let-dataItem>
                <span *ngIf="dataItem.IsProspect" class="pull-left">{{dataItem.Name}}
                    <p class="prospect-indicator pull-right" data-letters="P"></p>
                </span>
                <span *ngIf="!dataItem.IsProspect">{{dataItem.Name}}</span>
            </ng-template>
            <ng-template kendoGridHeaderTemplate let-column>
                <span title={{column.title}}>{{column.title}}</span>
            </ng-template>
            <ng-template kendoGridFilterMenuTemplate let-filter let-column="column" let-filterService="filterService">
                <kendo-grid-string-filter-menu
                    [column]="column"
                    [filter]="filter"
                    [filterService]="filterService">
                    <kendo-filter-eq-operator></kendo-filter-eq-operator>
                    <kendo-filter-neq-operator></kendo-filter-neq-operator>
                    <kendo-filter-contains-operator></kendo-filter-contains-operator>
                    <kendo-filter-not-contains-operator></kendo-filter-not-contains-operator>
                    <kendo-filter-startswith-operator></kendo-filter-startswith-operator>
                    <kendo-filter-endswith-operator></kendo-filter-endswith-operator>
                    <kendo-filter-isblank-operator></kendo-filter-isblank-operator>
                    <kendo-filter-isnotblank-operator></kendo-filter-isnotblank-operator>
                    <kendo-filter-isempty-operator text="xIs blank"></kendo-filter-isempty-operator>
                    <kendo-filter-isnotempty-operator text="xIs not blank"></kendo-filter-isnotempty-operator>
                </kendo-grid-string-filter-menu>
            </ng-template>
        </kendo-grid-column>

3 comments
Dominik
Posted on: 31 Oct 2024 09:59
we are looking for the same operators too :|
ADMIN
Svet
Posted on: 17 Mar 2022 08:27

Hi,

Thank you for the provided feedback. We are tracking the demand for this feature request. Please cast your vote. Thank you.

Regards,
Svet
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Jim
Posted on: 10 Mar 2022 16:30
We are looking for this same logic!  We want to create an InNullOrEmpty operator.  It would be great to allow custom operators to be added to default filters.