Merge pull request #744 from nestorrente/master-sortField
Fixed "sortField" prop type in Column, DataTable, TableHeader and DataView (PrimeVue 3)pull/800/head
commit
e0b4f48b6a
|
@ -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;
|
||||
|
|
|
@ -11,7 +11,7 @@ export default {
|
|||
default: null
|
||||
},
|
||||
sortField: {
|
||||
type: String,
|
||||
type: [String, Function],
|
||||
default: null
|
||||
},
|
||||
filterField: {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -85,7 +85,7 @@ export default {
|
|||
default: 'single'
|
||||
},
|
||||
sortField: {
|
||||
type: String,
|
||||
type: [String, Function],
|
||||
default: null
|
||||
},
|
||||
sortOrder: {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -95,7 +95,7 @@ export default {
|
|||
default: '({currentPage} of {totalPages})'
|
||||
},
|
||||
sortField: {
|
||||
type: String,
|
||||
type: [String, Function],
|
||||
default: null
|
||||
},
|
||||
sortOrder: {
|
||||
|
|
Loading…
Reference in New Issue