Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #6901: Custom passthrough options for bodyRow #6902

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions components/doc/common/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -19460,6 +19460,87 @@
],
"callbacks": []
},
"DataTableBodyRowContext": {
"description": "Defines current options in DataTable bodyRow.",
"relatedProp": "",
"props": [
{
"name": "selected",
"optional": false,
"readonly": false,
"type": "boolean"
},
{
"name": "selectable",
"optional": false,
"readonly": false,
"type": "boolean"
},
{
"name": "stripedRows",
"optional": false,
"readonly": false,
"type": "boolean"
},
{
"name": "index",
"optional": false,
"readonly": false,
"type": "number"
}
],
"callbacks": []
},
"DataTableBodyRowState": {
"description": "Defines current inline state in DataTable bodyRow.",
"relatedProp": "",
"props": [
{
"name": "editing",
"optional": false,
"readonly": false,
"type": "boolean"
}
],
"callbacks": []
},
"DataTableBodyRowPassThroughMethodOptions": {
"description": "Custom passthrough(pt) option method for bodyRow.",
"relatedProp": "",
"props": [
{
"name": "hostName",
"optional": false,
"readonly": false,
"type": "string"
},
{
"name": "context",
"optional": false,
"readonly": false,
"type": "DataTableBodyRowContext"
},
{
"name": "parent",
"optional": false,
"readonly": false,
"type": "DataTablePassThroughMethodOptions<TValue>"
},
{
"name": "props",
"optional": false,
"readonly": false,
"type": "DataTableBaseProps<TValue>"
},
{
"name": "state",
"optional": false,
"readonly": false,
"type": "DataTableBodyRowState"
}
],
"callbacks": []
},
"DataTableBaseProps": {
"description": "Defines valid properties in DataTable component. In addition to these, all properties of HTMLDivElement can be used in this component.",
"relatedProp": "",
Expand Down
28 changes: 28 additions & 0 deletions components/lib/datatable/datatable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,34 @@ export interface DataTablePassThroughOptions {
hooks?: ComponentHooks;
}

/**
* Defines current options in DataTable bodyRow.
*/
export interface DataTableBodyRowContext {
selected: boolean;
selectable: boolean;
stripedRows: boolean;
index: number;
}

/**
* Defines current inline state in DataTable bodyRow.
*/
export interface DataTableBodyRowState {
editing: boolean;
}

/**
* Custom passthrough(pt) option method for bodyRow.
*/
export interface DataTableBodyRowPassThroughMethodOptions<TValue extends DataTableValueArray> {
hostName: string;
context: DataTableBodyRowContext;
parent: DataTablePassThroughMethodOptions<TValue>;
props: DataTableBaseProps<TValue>;
state: DataTableBodyRowState;
}

type SortOrder = 1 | 0 | -1 | null | undefined;

/**
Expand Down
Loading