Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15287 Rev 15288
Línea 5... Línea 5...
5
	let sortedData
5
	let sortedData
Línea 6... Línea 6...
6
 
6
 
Línea 7... Línea 7...
7
	if (!sortKey) return tableData
7
	if (!sortKey) return tableData
8
 
8
 
9
	if (sortKey === 'name') {
-
 
10
		sortedData = tableData.sort((a, b) => {
-
 
11
			return a[sortKey] > b[sortKey] ? 1 : -1
9
	if (sortKey === 'name') {
Línea 12... Línea -...
12
		})
-
 
13
	}
-
 
14
 
-
 
15
	sortedData = tableData.sort((a, b) => {
-
 
16
		return a[sortKey] - b[sortKey]
10
		sortedData = tableData.sort((a, b) => a[sortKey] < b[sortKey] && -1)
17
	})
11
	}
18
 
12
 
Línea 19... Línea 13...
19
	if (reverse) {
13
	if (reverse) {