0.4: defaultSort does not seem to work
See original GitHub issueNot sure if it’s just my environment (latest chrome, windows 10) but adding defaultSort: "name"
to a list does not seem to enable sorting on that list field.
I’ve added keystonejs/keystonejs-site#54 just in case it’s a documentation issue.
Warning messages in console:
Used like this (according to doc example):
var MyList = new keystone.List('MyList', {
defaultSort: '+name'
});
MyList.add({
name: {
type: String,
},
...
});
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Search components "Default Sort Order dropdown cut off by ...
The Search component's Default Sort Order is cut off by the TouchUI dialog content container making it appear as though "Descending" is not...
Read more >274766 - Default Sort Changed - Bugzilla@Mozilla
Oops! The default seems to be by Status, not Severity. It's still different from Bug ID, which was the previous default.
Read more >Array sort is not working correctly in JavaScript - Stack Overflow
The code above will return the array sorted from smallest to largest correctly. You can sort largest to smallest (descending order) by reversing ......
Read more >Template:DEFAULTSORT - Wikipedia
{{DEFAULTSORT:<sort key>}} is a magic word used to modify the sequence of pages shown on category pages. The given sort key in a...
Read more >Examples • reactable - GitHub Pages
Sorting. Tables are sortable by default. You can sort a column by clicking on its header, or sort multiple columns by holding the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well,
defaultSort : 'name'
works, as doesdefaultSort : '-name'
. Usage with a plus sign is not mentioned in the docs as far as I can tell, but probably should be possible for the sake of completeness.ok, sorry, I forget to add createdAt field. example contains it, so there is no mistake. it’s my fault.