Skip to content

[DataQuery] Less than with nullable date/int #4614

Closed
@cheng93

Description

@cheng93

Description

Given the following data

[{age: 1}, {age: 2}, {age: null}]

when the oData query filter, $filter=age lt 2, is applied, you would not expect the last value to show up

Steps To Reproduce

https://stackblitz.com/edit/angular-rsabply1?file=src%2Fapp%2Fproducts.ts,src%2Fapp%2Fapp.component.ts

Set the filter to be less than today. You can see that undefined is filtered, but not null

I think it's because underneath, it's using JS default filter, i.e

[null, undefined, 1, 0].filter(x => x < 2) // [null, 1, 0]

Screenshots or video

No response

Actual Behavior

null is there

Expected Behavior

null not to be there

Browser

Chrome

Browser version

latest

OS type

Windows

OS version

No response

Last working version of the Kendo UI for Angular package (if regression).

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions