You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Temporal.PlainDate in column of Grid in my project, which may have null or undefined values. I am using Temporal.PlainDate.compare method as comparator for sorting rows which is failing while comparing with null and undefined values.
The text was updated successfully, but these errors were encountered:
That said, I would personally suggest a different way than making compare() handle null out of the box, because undoubtedly some applications will need the nulls sorted first, some will need the nulls sorted last, some will need to handle null but not undefined, etc. So it seems kind of arbitrary if we were to choose one or the other for all JavaScript developers.
Here's an example snippet that you could use to sort nulls first:
I am using
Temporal.PlainDate
in column of Grid in my project, which may havenull
orundefined
values. I am usingTemporal.PlainDate.compare
method as comparator for sorting rows which is failing while comparing with null and undefined values.The text was updated successfully, but these errors were encountered: