mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
#66 fix code style issues
This commit is contained in:
parent
a0848ea825
commit
3f61e3627d
@ -348,14 +348,14 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
|
|||||||
sort(node: NodePaging, options: ColumnSortingModel) {
|
sort(node: NodePaging, options: ColumnSortingModel) {
|
||||||
if (this._hasEntries(node)) {
|
if (this._hasEntries(node)) {
|
||||||
node.list.entries.sort((a: MinimalNodeEntity, b: MinimalNodeEntity) => {
|
node.list.entries.sort((a: MinimalNodeEntity, b: MinimalNodeEntity) => {
|
||||||
if (a.entry.isFolder != b.entry.isFolder) {
|
if (a.entry.isFolder !== b.entry.isFolder) {
|
||||||
return options.direction === 'asc'
|
return options.direction === 'asc'
|
||||||
? (a.entry.isFolder ? -1 : 1)
|
? (a.entry.isFolder ? -1 : 1)
|
||||||
: (a.entry.isFolder ? 1 : -1);
|
: (a.entry.isFolder ? 1 : -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
var left = this.getObjectValue(a.entry, options.key).toString();
|
let left = this.getObjectValue(a.entry, options.key).toString();
|
||||||
var right = this.getObjectValue(b.entry, options.key).toString();
|
let right = this.getObjectValue(b.entry, options.key).toString();
|
||||||
|
|
||||||
return options.direction === 'asc'
|
return options.direction === 'asc'
|
||||||
? left.localeCompare(right)
|
? left.localeCompare(right)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user