Skip to content

Commit

Permalink
Refactor #5349 #5341
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Mar 14, 2024
1 parent ec04c03 commit 3964a27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/lib/datatable/DataTable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ColumnGroupPassThroughOptionType } from '../columngroup';
import { PaginatorPassThroughOptionType } from '../paginator';
import { PassThroughOptions } from '../passthrough';
import { RowPassThroughOptionType } from '../row';
import { ClassComponent, GlobalComponentConstructor, Nullable, PassThrough, HintedString } from '../ts-helpers';
import { ClassComponent, GlobalComponentConstructor, HintedString, Nullable, PassThrough } from '../ts-helpers';
import { VirtualScrollerPassThroughOptionType, VirtualScrollerProps } from '../virtualscroller';

export declare type DataTablePassThroughOptionType = DataTablePassThroughAttributes | ((options: DataTablePassThroughMethodOptions) => DataTablePassThroughAttributes | string) | string | null | undefined;
Expand Down Expand Up @@ -1067,7 +1067,7 @@ export interface DataTableProps {
/**
* A function that takes the row data as a parameter and returns a string to apply a particular class for the row.
*/
rowClass?: (data: any) => object | string | undefined;
rowClass?: (data: any) => object | undefined;
/**
* A function that takes the row data as a parameter and returns the inline style for the corresponding row.
*/
Expand Down

1 comment on commit 3964a27

@m-meier
Copy link
Contributor

@m-meier m-meier commented on 3964a27 Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this commit should be reverted. rowClass can return a string as well as an object as it will be applied as :class="[...,]". With this change typescript will throw an error when returning a string (:rowClass="() => 'testclass'").This is probably the problem mentioned in #5498.

Please sign in to comment.