Skip to content

Commit 024b7c1

Browse files
authored
Fix #5353 Datatable BodyRow docs (#7940)
1 parent 87078c9 commit 024b7c1

File tree

1 file changed

+40
-3
lines changed

1 file changed

+40
-3
lines changed

components/lib/datatable/datatable.d.ts

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,33 +1013,70 @@ export interface DataTablePassThroughOptions {
10131013
}
10141014

10151015
/**
1016-
* Defines current options in DataTable bodyRow.
1016+
* Defines current options in DataTable BodyRow which is the table <TR> element.
10171017
*/
10181018
export interface DataTableBodyRowContext {
1019+
/**
1020+
* Whether the row is selected.
1021+
*/
10191022
selected: boolean;
1023+
/**
1024+
* Whether the row is selectable.
1025+
*/
10201026
selectable: boolean;
1027+
/**
1028+
* Whether the rows have striped styling.
1029+
*/
10211030
stripedRows: boolean;
1031+
/**
1032+
* Index of the row. Note: this is not the index of the value array its the index of the row <TR in the table.
1033+
*/
10221034
index: number;
10231035
}
10241036

10251037
/**
1026-
* Defines current inline state in DataTable bodyRow.
1038+
* Defines current inline state in DataTable BodyRow which is the table <TR> element.
10271039
*/
10281040
export interface DataTableBodyRowState {
1041+
/**
1042+
* Whether the row is in editing mode.
1043+
*/
10291044
editing: boolean;
10301045
}
10311046

10321047
/**
1033-
* Custom passthrough(pt) option method for bodyRow.
1048+
* Custom passthrough(pt) option method for BodyRow which is the table <TR> element.
10341049
*/
10351050
export interface DataTableBodyRowPassThroughMethodOptions<TValue extends DataTableValueArray> {
1051+
/**
1052+
* Name of the component.
1053+
*/
10361054
hostName: string;
1055+
/**
1056+
* Current context of the bodyRow.
1057+
*/
10371058
context: DataTableBodyRowContext;
1059+
/**
1060+
* Parent options.
1061+
*/
10381062
parent: DataTablePassThroughMethodOptions<TValue>;
1063+
/**
1064+
* Component props.
1065+
*/
10391066
props: DataTableBaseProps<TValue>;
1067+
/**
1068+
* Current state of the bodyRow.
1069+
*/
10401070
state: DataTableBodyRowState;
10411071
}
10421072

1073+
/**
1074+
* Type for sort order values.
1075+
* - 1: Ascending order
1076+
* - 0: No sorting
1077+
* - -1: Descending order
1078+
* - null or undefined: No sorting
1079+
*/
10431080
type SortOrder = 1 | 0 | -1 | null | undefined;
10441081

10451082
/**

0 commit comments

Comments
 (0)