Skip to content

Commit

Permalink
Fix primefaces#7102: DataView fix listTemplate typescript def
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Sep 3, 2024
1 parent cfe5b03 commit d65a694
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/lib/dataview/dataview.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,11 @@ export interface DataViewProps extends Omit<React.DetailedHTMLProps<React.HTMLAt
itemTemplate?(item: any, layout?: 'list' | 'grid' | (string & Record<string, unknown>)): React.ReactNode | undefined;
/**
* Function that gets the options along with the layout mode and returns the content.
* @param {*} item - Current item.
* @param {'list' | 'grid' | (string & Record<string, unknown>)} layout - Current layout.
* @param {*} items - Array of items to be rendered.
* @param {'list' | 'grid' | (string & Record<string, unknown>)} [layout] - Current layout mode.
* @returns {React.ReactNode | React.ReactNode[] | undefined} The content to be rendered.
*/
listTemplate?(items: any[], layout?: 'list' | 'grid' | (string & Record<string, unknown>)): React.ReactNode[] | undefined;
listTemplate?(items: any[], layout?: 'list' | 'grid' | (string & Record<string, unknown>)): React.ReactNode | React.ReactNode[] | undefined;
/**
* Used to get the child elements of the component.
* @readonly
Expand Down

0 comments on commit d65a694

Please sign in to comment.