Merge pull request #744 from nestorrente/master-sortField

Fixed "sortField" prop type in Column, DataTable, TableHeader and DataView (PrimeVue 3)
pull/800/head
Cagatay Civici 2020-12-09 16:21:36 +03:00 committed by GitHub
commit e0b4f48b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 12 deletions

View File

@ -3,7 +3,7 @@ import Vue from 'vue';
declare class Column extends Vue {
columnKey?: any;
field?: string;
sortField?: string;
sortField?: string | ((item: any) => any);
filterField?: string;
sortable?: boolean;
header?: any;
@ -30,4 +30,4 @@ declare class Column extends Vue {
frozen?: boolean;
}
export default Column;
export default Column;

View File

@ -11,7 +11,7 @@ export default {
default: null
},
sortField: {
type: String,
type: [String, Function],
default: null
},
filterField: {

View File

@ -1,4 +1,4 @@
import Vue, { VNode } from 'vue';
import Vue, {VNode} from 'vue';
declare class DataTable extends Vue {
value?: any[];
@ -16,7 +16,7 @@ declare class DataTable extends Vue {
lazy?: boolean;
loading?: boolean;
loadingIcon?: string;
sortField?: string | Function;
sortField?: string | ((item: any) => any);
sortOrder?: number;
defaultSortOrder?: number;
multiSortMeta?: any[];
@ -26,7 +26,7 @@ declare class DataTable extends Vue {
[s: string]: any;
};
filterLocale?: string;
selection?: any[]|any;
selection?: any[] | any;
selectionMode?: string;
compareSelectionBy?: string;
metaKeySelection?: boolean;
@ -43,7 +43,7 @@ declare class DataTable extends Vue {
expandedRowIcon?: string;
collapsedRowIcon?: string;
rowGroupMode?: string;
groupRowsBy?: string[]|string;
groupRowsBy?: string[] | string;
expandableRowGroups?: boolean;
expandedRowGroups?: any[];
stateStorage?: string;
@ -58,6 +58,7 @@ declare class DataTable extends Vue {
virtualScroll?: boolean;
virtualRowHeight?: string;
virtualScrollDelay?: number;
$emit(eventName: 'page', event: Event): this;
$emit(eventName: 'sort', event: Event): this;
$emit(eventName: 'filter', event: Event): this;
@ -78,13 +79,14 @@ declare class DataTable extends Vue {
$emit(eventName: 'row-edit-init', event: Event): this;
$emit(eventName: 'row-edit-save', event: Event): this;
$emit(eventName: 'row-edit-cancel', event: Event): this;
$slots: {
header: VNode[];
paginatorLeft: VNode[];
paginatorRight: VNode[];
empty: VNode[];
footer: VNode[];
}
};
}
export default DataTable;
export default DataTable;

View File

@ -85,7 +85,7 @@ export default {
default: 'single'
},
sortField: {
type: String,
type: [String, Function],
default: null
},
sortOrder: {

View File

@ -13,7 +13,7 @@ declare class DataView extends Vue {
pageLinkSize?: number;
rowsPerPageOptions?: number[];
currentPageReportTemplate?: string;
sortField?: string;
sortField?: string | ((item: any) => any);
sortOrder?: number;
lazy?: boolean;
$emit(eventName: 'page', event: Event): this;

View File

@ -95,7 +95,7 @@ export default {
default: '({currentPage} of {totalPages})'
},
sortField: {
type: String,
type: [String, Function],
default: null
},
sortOrder: {