Bug: Table sort not working when there are null values in Default column

Given a table with these values in data:

[{ value: "C" }, { value: "A" }, { value: null }, { value: "D" }, { value: "B" }]

Then there is this behaviour when we sort the column with the Default type:

  • When not sorted (expected)
    image

  • When sorted ascending:
    image

  • When sorted descending:
    image

This issue is only present with the Default type. The String type works as expected.

This is the same cause as this issue: Potential bug: Table sorting occasionally not working correctly

Retool version 2.80.17

1 Like

@aturiot

Hey! It looks like there is a bug report for this, thank you for pointing it out! We linked the bug report to this thread so you will be notified when it is fixed. In the meantime, we have found that setting the column to a specific type instead of Auto tends to have much more reliable sorting. Hope that helps!

1 Like

Thanks, yes setting the String type solves the issue.
Here this is mostly for newcomers to Retool that expect it to work properly by Default. In our case this was one of our end customer that reported this problem.

1 Like