From d65a69467523dc075b229452271317d9ed63d94c Mon Sep 17 00:00:00 2001 From: melloware Date: Tue, 3 Sep 2024 07:42:44 -0400 Subject: [PATCH] Fix #7102: DataView fix listTemplate typescript def --- components/lib/dataview/dataview.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/lib/dataview/dataview.d.ts b/components/lib/dataview/dataview.d.ts index 8a32a3b2fd..57d2fa6a56 100755 --- a/components/lib/dataview/dataview.d.ts +++ b/components/lib/dataview/dataview.d.ts @@ -339,10 +339,11 @@ export interface DataViewProps extends Omit)): 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)} layout - Current layout. + * @param {*} items - Array of items to be rendered. + * @param {'list' | 'grid' | (string & Record)} [layout] - Current layout mode. + * @returns {React.ReactNode | React.ReactNode[] | undefined} The content to be rendered. */ - listTemplate?(items: any[], layout?: 'list' | 'grid' | (string & Record)): React.ReactNode[] | undefined; + listTemplate?(items: any[], layout?: 'list' | 'grid' | (string & Record)): React.ReactNode | React.ReactNode[] | undefined; /** * Used to get the child elements of the component. * @readonly