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(DataTable): fix rowClass type definition and improve usage documentation for rowClass and rowStyle. Fixes #5498 #5638

Merged
merged 1 commit into from
Apr 26, 2024
Merged
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
9 changes: 6 additions & 3 deletions components/lib/datatable/DataTable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1066,12 +1066,15 @@ export interface DataTableProps {
editingRows?: any[] | DataTableEditingRows;
/**
* A function that takes the row data as a parameter and returns a string to apply a particular class for the row.
* The return value is added to the row's :classes array (see Vue.js class bindings).
*/
rowClass?: (data: any) => object | undefined;
rowClass?: (data: any) => string | object | undefined;
/**
* A function that takes the row data as a parameter and returns the inline style for the corresponding row.
* A function that takes the row data as a parameter and returns the inline style object for the corresponding row.
* The function may also return an array of style objects which will be merged.
* The return value of this function is directly applied as a Vue.js style-binding on the table row.
*/
rowStyle?: (data: any) => object | undefined;
rowStyle?: (data: any) => object | object[] | undefined;
/**
* When specified, enables horizontal and/or vertical scrolling.
* @defaultValue false
Expand Down
Loading