4

Recently I was use angular smart-table. The st-sort works fine except one thing: when the sort field contains empty value, it place the empty value in the middle of the sort between n and m. How can I make the empty value always at the bottom when sorting?

1 Answer 1

4

It's a bug (IMO) with smart-table and treating null, undefined, and empty strings inconsistently when sorting. null values are converted to their string representation of 'null' and then sorted, hence why they always get placed between n and m.

I've logged an issue: https://github.com/lorenzofox3/Smart-Table/issues/669

And repro plunkr:

http://plnkr.co/edit/BEBdzWI44z3BiIxRRDET?p=preview

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.