-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
DataTable.d.ts
executable file
·1499 lines (1456 loc) · 40.2 KB
/
DataTable.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
*
* DataTable displays data in tabular format.
*
* [Live Demo](https://www.primevue.org/datatable/)
*
* @module datatable
*
*/
import { InputHTMLAttributes, TableHTMLAttributes, TransitionProps, VNode } from 'vue';
import { ComponentHooks } from '../basecomponent';
import { ColumnPassThroughOptionType } from '../column';
import { ColumnGroupPassThroughOptionType } from '../columngroup';
import { PaginatorPassThroughOptionType } from '../paginator';
import { PassThroughOptions } from '../passthrough';
import { RowPassThroughOptionType } from '../row';
import { ClassComponent, GlobalComponentConstructor, Nullable, PassThrough } from '../ts-helpers';
import { VirtualScrollerPassThroughOptionType, VirtualScrollerProps } from '../virtualscroller';
export declare type DataTablePassThroughOptionType = DataTablePassThroughAttributes | ((options: DataTablePassThroughMethodOptions) => DataTablePassThroughAttributes | string) | string | null | undefined;
export declare type DataTablePassThroughTransitionType = TransitionProps | ((options: DataTablePassThroughMethodOptions) => TransitionProps) | undefined;
/**
* Custom passthrough(pt) option method.
*/
export interface DataTablePassThroughMethodOptions {
/**
* Defines instance.
*/
instance: any;
/**
* Defines valid properties.
*/
props: DataTableProps;
/**
* Defines current inline state.
*/
state: DataTableState;
/**
* Defines current options.
*/
context: DataTableContext;
/**
* Defines passthrough(pt) options in global config.
*/
global: object | undefined;
}
/**
* Custom datatable export metadata.
*/
export interface DataTableExportFunctionOptions {
/**
* Row data
*/
data: any;
/**
* Column Field
*/
field: string;
}
/**
* Custom datatable filter metadata.
*/
export interface DataTableFilterMetaData {
/**
* Filter value
*/
value: any;
/**
* Filter match mode
*/
matchMode: 'startsWith' | 'contains' | 'notContains' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'dateIs' | 'dateIsNot' | 'dateBefore' | 'dateAfter' | string | undefined;
}
/**
* Custom datatable operator filter metadata.
*/
export interface DataTableOperatorFilterMetaData {
/**
* Filter operator
*/
operator: string;
/**
* Array of filter meta datas.
*/
constraints: DataTableFilterMetaData[];
}
/**
* Custom datatable filter metadata.
*/
export interface DataTableFilterMeta {
/**
* Extra options
*/
[key: string]: string | DataTableFilterMetaData | DataTableOperatorFilterMetaData;
}
/**
* Custom datatable sort meta.
*/
export interface DataTableSortMeta {
/**
* Column field
*/
field: string;
/**
* Column sort order
*/
order: 1 | 0 | -1 | undefined | null;
}
/**
* Custom datatable expanded rows.
*/
export interface DataTableExpandedRows {
[key: string]: boolean;
}
/**
* Custom datatable editing rows.
*/
export interface DataTableEditingRows {
[key: string]: boolean;
}
/**
* Custom datatable export csv metadata.
*/
export interface DataTableExportCSVOptions {
/**
* Whether to export only selection data.
*/
selectionOnly: boolean;
}
/**
* Custom sort event.
* @see {@link DataTableEmits.sort}
*/
export interface DataTableSortEvent {
/**
* Browser event.
*/
originalEvent: Event;
/**
* Index of first record
*/
first: number;
/**
* Number of rows to display in new page
*/
rows: number;
/**
* Field to sort against
*/
sortField: string | ((item: any) => string) | undefined;
/**
* Sort order as integer
*/
sortOrder: 1 | 0 | -1 | undefined | null;
/**
* MultiSort metadata
*/
multiSortMeta: DataTableSortMeta[] | undefined;
/**
* Collection of active filters
* @see DataTableFilterMeta
*/
filters: DataTableFilterMeta;
/**
* Match modes per field
*/
filterMatchModes: 'startsWith' | 'contains' | 'notContains' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'dateIs' | 'dateIsNot' | 'dateBefore' | 'dateAfter' | string | undefined;
}
/**
* Custom pagination event.
* @see {@link DataTableEmits.page}
* @extends DataTableSortEvent
*/
export interface DataTablePageEvent extends DataTableSortEvent {
/**
* New page number
*/
page: number;
/**
* Total page count
*/
pageCount: number;
}
/**
* Custom filter event.
* @see {@link DataTableEmits.filter}
* @extends DataTableSortEvent
*/
export interface DataTableFilterEvent extends DataTableSortEvent {
/**
* Filtered collection (non-lazy only)
*/
filteredValue: any;
}
/**
* Custom row click event.
* @see {@link DataTableEmits['row-click']}
*/
export interface DataTableRowClickEvent {
/**
* Browser event.
*/
originalEvent: Event;
/**
* Selected row data.
*/
data: any;
/**
* Row index.
*/
index: number;
}
/**
* Custom row double click event.
* @see {@link DataTableEmits['row-dblclick']]}
* @extends DataTableRowClickEvent
*/
export interface DataTableRowDoubleClickEvent extends DataTableRowClickEvent {}
/**
* Custom row context menu event.
* @see {@link DataTableEmits['row-contextmenu']}
* @extends DataTableRowClickEvent
*/
export interface DataTableRowContextMenuEvent extends DataTableRowClickEvent {}
/**
* Custom row select event.
* @see {@link DataTableEmits['row-select']}
*/
export interface DataTableRowSelectEvent {
/**
* Browser event
*/
originalEvent: Event;
/**
* Selected row data
*/
data: any;
/**
* Row index
*/
index: number;
/**
* Type of the selection, valid values are 'row', 'radio' or 'checkbox'.
*/
type: string;
}
/**
* Custom row unselect event.
* @see {@link DataTableEmits['row-unselect']}
* @extends DataTableRowSelectEvent
*/
export interface DataTableRowUnselectEvent extends DataTableRowSelectEvent {}
/**
* Custom row select all event.
* @see {@link DataTableEmits['row-select-all']}
*/
export interface DataTableRowSelectAllEvent {
/**
* Browser event
*/
originalEvent: Event;
/**
* Selected dataset
*/
data: any;
}
/**
* Custom row unselect all event.
* @see {@link DataTableEmits['row-unselect-all']}
*/
export interface DataTableRowUnselectAllEvent {
/**
* Browser event
*/
originalEvent: Event;
}
/**
* Custom row select all change event.
* @see {@link DataTableEmits['select-all-change']}
*/
export interface DataTableSelectAllChangeEvent {
/**
* Browser event
*/
originalEvent: Event;
/**
* Whether all data is selected.
*/
checked: boolean;
}
/**
* Custom column resize end event.
* @see {@link DataTableEmits['column-resize-end']}
*/
export interface DataTableColumnResizeEndEvent {
/**
* DOM element of the resized column.
*/
element: HTMLElement;
/**
* Change in column width
*/
delta: any;
}
/**
* Custom row column reorder event.
* @see {@link DataTableEmits['column-reorder']}
*/
export interface DataTableColumnReorderEvent {
/**
* Browser event
*/
originalEvent: Event;
/**
* Index of the dragged column
*/
dragIndex: number;
/**
* Index of the dropped column
*/
dropIndex: number;
}
/**
* Custom row reorder event.
* @see {@link DataTableEmits['row-reorder']}
*/
export interface DataTableRowReorderEvent {
/**
* Browser event
*/
originalEvent: Event;
/**
* Index of the dragged row
*/
dragIndex: number;
/**
* Index of the dropped row
*/
dropIndex: number;
/**
* Reordered value
*/
value: any[];
}
/**
* Custom row expand event.
* @see {@link DataTableEmits['row-expand']}
*/
export interface DataTableRowExpandEvent {
/**
* Browser event
*/
originalEvent: Event;
/**
* Expanded row data
*/
data: any[];
}
/**
* Custom row collapse event.
* @see {@link DataTableEmits['row-expand']}
* @extends DataTableRowExpandEvent
*/
export interface DataTableRowCollapseEvent extends DataTableRowExpandEvent {}
/**
* Custom cell edit init event.
* @see {@link DataTableEmits['cell-edit-init']}
*/
export interface DataTableCellEditInitEvent {
/**
* Browser event
*/
originalEvent: Event;
/**
* Row data to edit.
*/
data: any;
/**
* Field name of the row data.
*/
field: string;
/**
* Index of the row data to edit.
*/
index: number;
}
/**
* Custom cell edit cancel event.
* @see {@link DataTableEmits['cell-edit-cancel']}
* @extends DataTableCellEditInitEvent
*/
export interface DataTableCellEditCancelEvent extends DataTableCellEditInitEvent {}
/**
* Custom cell edit complete event.
* @see {@link DataTableEmits['cell-edit-complete']}
*/
export interface DataTableCellEditCompleteEvent {
/**
* Browser event
*/
originalEvent: Event;
/**
* Row data to edit.
*/
data: any;
/**
* New row data after editing.
*/
newData: any;
/**
* Field value of row data to edit.
*/
value: any;
/**
* Field value of new row data after editing.
*/
newValue: any;
/**
* Field name of the row data.
*/
field: string;
/**
* Index of the row data to edit.
*/
index: number;
/**
* Type of completion such as 'enter', 'outside' or 'tab'.
*/
type: string;
}
/**
* Custom row edit init event.
* @see {@link DataTableEmits['row-edit-init']}
*/
export interface DataTableRowEditInitEvent {
/**
* Browser event
*/
originalEvent: Event;
/**
* Row data to edit.
*/
data: any;
/**
* New row data after editing.
*/
newData: any;
/**
* Field name of the row data.
*/
field: string;
/**
* Index of the row data to edit.
*/
index: number;
}
/**
* Custom row edit save event.
* @see {@link DataTableEmits['row-edit-save']}
* @extends DataTableRowEditInitEvent
*/
export interface DataTableRowEditSaveEvent extends DataTableRowEditInitEvent {}
/**
* Custom row edit cancel event.
* @see {@link DataTableEmits['row-edit-cancel']}
* @extends DataTableRowEditCancelEvent
*/
export interface DataTableRowEditCancelEvent extends DataTableRowEditInitEvent {}
/**
* Custom state event.
* @see {@link DataTableEmits['state-save']}
*/
export interface DataTableStateEvent {
/**
* Index of first record
*/
first: number;
/**
* Number of rows to display in new page
*/
rows: number;
/**
* Field to sort against
*/
sortField: string;
/**
* Sort order as integer
*/
sortOrder: 1 | 0 | -1 | undefined | null;
/**
* MultiSort metadata
*/
multiSortMeta: DataTableSortMeta[] | undefined;
/**
* Collection of active filters
*/
filters: DataTableFilterMeta;
/**
* Comma separated list of column widths
*/
columWidths: string[];
/**
* Order of the columns
*/
columnOrder: string[];
/**
* Instances of rows in expanded state
*/
expandedRows: any[] | DataTableExpandedRows;
/**
* Keys of rows in expanded state
*/
expandedRowKeys: any[];
/**
* Instances of rows in expanded state
*/
expandedRowGroups: any[] | DataTableExpandedRows;
/**
* Selected rows
*/
selection: any[] | any;
/**
* Keys of selected rows
*/
selectionKeys: any[];
}
/**
* Custom passthrough(pt) options.
* @see {@link DataTableProps.pt}
*/
export interface DataTablePassThroughOptions {
/**
* Used to pass attributes to the root's DOM element.
*/
root?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the loading overlay's DOM element.
*/
loadingOverlay?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the loading icon's DOM element.
*/
loadingIcon?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the header's DOM element.
*/
header?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the Paginator component.
* @see {@link PaginatorPassThroughOptionType}
*/
paginator?: PaginatorPassThroughOptionType;
/**
* Used to pass attributes to the wrapper's DOM element.
*/
wrapper?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the VirtualScroller component.
* @see {@link VirtualScrollerPassThroughOptionType}
*/
virtualScroller?: VirtualScrollerPassThroughOptionType;
/**
* Used to pass attributes to the table's DOM element.
*/
table?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the virtual scroller spacer's DOM element.
*/
virtualScrollerSpacer?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the footer's DOM element.
*/
footer?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the thead's DOM element.
*/
thead?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the header row's DOM element.
*/
headerRow?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the tbody's DOM element.
*/
tbody?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the rowgroup header's DOM element.
*/
rowGroupHeader?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the rowgroup header cell's DOM element.
*/
rowGroupHeaderCell?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the body row's DOM element.
*/
bodyRow?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the row expansion's DOM element.
*/
rowExpansion?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the row expansion cell's DOM element.
*/
rowExpansionCell?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the rowgroup footer's DOM element.
*/
rowGroupFooter?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the rowgroup footer cell's DOM element.
*/
rowGroupFooterCell?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the empty message's DOM element.
*/
emptyMessage?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the empty message cell's DOM element.
*/
emptyMessageCell?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the tfoot's DOM element.
*/
tfoot?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the footer row's DOM element.
*/
footerRow?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the resize helper's DOM element.
*/
resizeHelper?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the reorder indicator up's DOM element.
*/
reorderIndicatorUp?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the reorder indicator down's DOM element.
*/
reorderIndicatorDown?: DataTablePassThroughOptionType;
/**
* Used to pass attributes to the ColumnGroup helper components.
*/
columnGroup?: ColumnGroupPassThroughOptionType;
/**
* Used to pass attributes to the Row helper components.
*/
row?: RowPassThroughOptionType;
/**
* Used to pass attributes to the Column helper components.
*/
column?: ColumnPassThroughOptionType;
/**
* Used to manage all lifecycle hooks
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
/**
* Used to control Vue Transition API.
*/
transition?: DataTablePassThroughTransitionType;
}
/**
* Custom passthrough attributes for each DOM elements
*/
export interface DataTablePassThroughAttributes {
[key: string]: any;
}
/**
* Defines current inline state in DataTable component.
*/
export interface DataTableState {
/**
* Current index of first record as a number.
*/
d_first: number;
/**
* Current number of rows to display in new page as a number.
*/
d_rows: number;
/**
* Current sort field.
*/
d_sortField: string | ((item: any) => string) | undefined;
/**
* Current order to sort the data by default.
*/
d_sortOrder: number;
/**
* Current sortmeta objects to sort the data.
*/
d_multiSortMeta: DataTableSortMeta[];
/**
* Current group sortmeta objects to sort the data.
*/
d_groupRowsSortMeta: DataTableSortMeta;
/**
* Current keys of selected rows.
*/
d_selectionKeys: any[];
/**
* Current keys of rows in expanded state.
*/
d_expandedRowKeys: any[];
/**
* Current order of the columns.
*/
d_columnOrder: string[];
/**
* Current keys of editing rows.
*/
d_editingRowKeys: any;
/**
* Current editing meta data.
*/
d_editingMeta: object;
/**
* Current filters object.
*/
d_filters: DataTableFilterMeta;
/**
* Current editing as a boolean.
* @defaultValue false
*/
d_editing: boolean;
}
/**
* Defines current options in DataTable component.
*/
export interface DataTableContext {
/**
* Current index of the row.
*/
index: number;
/**
* Current selectable state of row as a boolean.
* @defaultValue false
*/
selectable: boolean;
/**
* Current selected state of row as a boolean.
* @defaultValue false
*/
selected: boolean;
/**
* Current stripedRows state of row as a boolean.
* @defaultValue false
*/
stripedRows: boolean;
}
/**
* Defines valid properties in DataTable component.
*/
export interface DataTableProps {
/**
* An array of objects to display.
*/
value?: any[] | undefined | null;
/**
* Name of the field that uniquely identifies the a record in the data.
*/
dataKey?: string | ((item: any) => string) | undefined;
/**
* Number of rows to display per page.
* @defaultValue 0
*/
rows?: number | undefined;
/**
* Index of the first row to be displayed.
* @defaultValue 0
*/
first?: number | undefined;
/**
* Number of total records, defaults to length of value when not defined.
* @defaultValue 0
*/
totalRecords?: number | undefined;
/**
* When specified as true, enables the pagination.
* @defaultValue false
*/
paginator?: boolean | undefined;
/**
* Position of the paginator, options are 'top','bottom' or 'both'.
* @defaultValue bottom
*/
paginatorPosition?: 'top' | 'bottom' | 'both' | undefined;
/**
* Whether to show it even there is only one page.
* @defaultValue true
*/
alwaysShowPaginator?: boolean | undefined;
/**
* Template of the paginator. It can be customized using the template property using the predefined keys.
*
* - FirstPageLink
* - PrevPageLink
* - PageLinks
* - NextPageLink
* - LastPageLink
* - RowsPerPageDropdown
* - JumpToPageDropdown
* - JumpToPageInput
* - CurrentPageReport
* @defaultValue FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown
*/
paginatorTemplate?: any | string;
/**
* Number of page links to display.
* @defaultValue 5
*/
pageLinkSize?: number | undefined;
/**
* Array of integer values to display inside rows per page dropdown.
*/
rowsPerPageOptions?: number[] | undefined;
/**
* Template of the current page report element. It displays information about the pagination state. Available placeholders are the following;
*
* - {currentPage}
* - {totalPages}
* - {rows}
* - {first}
* - {last}
* - {totalRecords}
* @defaultValue '({currentPage} of {totalPages})'
*/
currentPageReportTemplate?: string | undefined;
/**
* Defines if data is loaded and interacted with in lazy manner.
* @defaultValue false
*/
lazy?: boolean | undefined;
/**
* Displays a loader to indicate data load is in progress.
* @defaultValue false
*/
loading?: boolean | undefined;
/**
* The icon to show while indicating data load is in progress.
* @deprecated since v3.27.0. Use 'loadingicon' slot.
*/
loadingIcon?: string | undefined;
/**
* Property name or a getter function of a row data used for sorting by default
*/
sortField?: string | ((item: any) => string) | undefined;
/**
* Order to sort the data by default.
*/
sortOrder?: number | undefined;
/**
* Determines how null values are sorted.
* @defaultValue 1
*/
nullSortOrder?: number;
/**
* Default sort order of an unsorted column.
* @defaultValue 1
*/
defaultSortOrder?: number | undefined;
/**
* An array of SortMeta objects to sort the data.
*/
multiSortMeta?: DataTableSortMeta[] | undefined;
/**
* Defines whether sorting works on single column or on multiple columns.
* @defaultValue single
*/
sortMode?: 'single' | 'multiple' | undefined;
/**
* When enabled, columns can have an un-sorted state.
* @defaultValue false
*/
removableSort?: boolean | undefined;
/**
* Filters object with key-value pairs to define the filters.
* @see DataTableFilterMeta
*/
filters?: DataTableFilterMeta;
/**
* Layout of the filter elements.
*/
filterDisplay?: 'menu' | 'row' | undefined;
/**
* Fields for global filter
*/
globalFilterFields?: string[] | undefined;
/**
* Locale to use in filtering. The default locale is the host environment's current locale.
*/
filterLocale?: string | undefined;
/**
* Selected row in single mode or an array of values in multiple mode.
*/
selection?: any[] | any | undefined;
/**
* Specifies the selection mode.
*/
selectionMode?: 'single' | 'multiple' | undefined;
/**
* Algorithm to define if a row is selected.
* @defaultValue deepEquals
*/
compareSelectionBy?: 'equals' | 'deepEquals' | undefined;
/**
* Defines whether metaKey is requred or not for the selection. When true metaKey needs to be pressed to select or unselect an item and
* when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically.
* @defaultValue true
*/
metaKeySelection?: boolean | undefined;
/**
* Enables context menu integration.
* @defaultValue false
*/
contextMenu?: boolean | undefined;
/**
* Selected row instance with the ContextMenu.
*/
contextMenuSelection?: any | any[] | undefined;
/**
* Whether all data is selected.
*/
selectAll?: Nullable<boolean>;
/**
* When enabled, background of the rows change on hover.
* @defaultValue false
*/
rowHover?: boolean | undefined;
/**
* Character to use as the csv separator.
* @defaultValue ,
*/
csvSeparator?: string | undefined;
/**
* Name of the exported file.
* @defaultValue download
*/
exportFilename?: string | undefined;
/**
* Custom function to export data.
*/
exportFunction?: (options: DataTableExportFunctionOptions) => any;
/**
* When enabled, columns can be resized using drag and drop.
* @defaultValue false
*/
resizableColumns?: boolean | undefined;
/**
* Defines whether the overall table width.
* @defaultValue fit
*/
columnResizeMode?: 'fit' | 'expand' | undefined;
/**
* When enabled, columns can be reordered using drag and drop.
* @defaultValue false
*/
reorderableColumns?: boolean | undefined;
/**
* A collection of row data display as expanded.
*/
expandedRows?: any[] | DataTableExpandedRows | null;