Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 15285 | Rev 15287 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 15285 Rev 15286
Línea 9... Línea 9...
9
	if (sortKey === 'name') {
9
	if (sortKey === 'name') {
10
		sortedData = tableData.sort((a, b) => {
10
		sortedData = tableData.sort((a, b) => {
11
			return a[sortKey] > b[sortKey] ? 1 : -1
11
			return a[sortKey] > b[sortKey] ? 1 : -1
12
		})
12
		})
13
	}
13
	}
14
	
14
 
15
	sortedData = tableData.sort((a, b) => {
15
	sortedData = tableData.sort((a, b) => {
16
		return a[sortKey] - b[sortKey]
16
		return a[sortKey] - b[sortKey]
17
	})
17
	})
Línea 18... Línea 18...
18
 
18
 
19
	if (reverse) {
19
	if (reverse) {
20
		return sortedData.reverse()
20
		sortedData.reverse()
Línea -... Línea 21...
-
 
21
	}
-
 
22
 
-
 
23
	console.log(sortData)
-
 
24
	console.log(sortKey)
21
	}
25
	console.log(tableData)
22
 
26
 
Línea 23... Línea 27...
23
	return sortedData
27
	return sortedData
24
}
28
}