Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cheng93 opened this issue Apr 28, 2025 · 1 comment
Open

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

cheng93 opened this issue Apr 28, 2025 · 1 comment

Comments

@cheng93
Copy link

cheng93 commented Apr 28, 2025

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

@cheng93
Copy link
Author

cheng93 commented Apr 28, 2025

Is this a feature, or is it a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant