mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
956c8b4330
41 changed files with 208 additions and 161 deletions
2
components/lib/datatable/DataTable.d.ts
vendored
2
components/lib/datatable/DataTable.d.ts
vendored
|
@ -1103,6 +1103,7 @@ export interface DataTableSlots {
|
|||
empty(): VNode[];
|
||||
/**
|
||||
* Custom group header template.
|
||||
* @param {Object} scope - group header slot's params.
|
||||
*/
|
||||
groupheader(scope: {
|
||||
/**
|
||||
|
@ -1130,6 +1131,7 @@ export interface DataTableSlots {
|
|||
}): VNode[];
|
||||
/**
|
||||
* Custom loading template.
|
||||
* @param {Object} scope - loading slot's params.
|
||||
*/
|
||||
loading(): VNode[];
|
||||
/**
|
||||
|
|
|
@ -526,7 +526,7 @@ export default {
|
|||
if (value1 == null && value2 != null) result = -1;
|
||||
else if (value1 != null && value2 == null) result = 1;
|
||||
else if (value1 == null && value2 == null) result = 0;
|
||||
else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, { numeric: true });
|
||||
else if (typeof value1 === 'string' && typeof value2 === 'string') result = new Intl.Collator(undefined, { numeric: true }).compare(value1, value2);
|
||||
else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
||||
|
||||
return this.d_sortOrder * result;
|
||||
|
@ -562,7 +562,7 @@ export default {
|
|||
|
||||
if (typeof value1 === 'string' || value1 instanceof String) {
|
||||
if (value1.localeCompare && value1 !== value2) {
|
||||
return this.d_multiSortMeta[index].order * value1.localeCompare(value2, undefined, { numeric: true });
|
||||
return this.d_multiSortMeta[index].order * new Intl.Collator(undefined, { numeric: true }).compare(value1, value2);
|
||||
}
|
||||
} else {
|
||||
result = value1 < value2 ? -1 : 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue