Merge pull request #5638 from m-meier/patch-#5498

fix(DataTable): fix rowClass type definition and improve usage documentation for rowClass and rowStyle. Fixes #5498
pull/5656/head
Tuğçe Küçükoğlu 2024-04-26 10:41:46 +03:00 committed by GitHub
commit 1a004acd74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -1066,12 +1066,15 @@ export interface DataTableProps {
editingRows?: any[] | DataTableEditingRows; 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. * 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. * When specified, enables horizontal and/or vertical scrolling.
* @defaultValue false * @defaultValue false