diff --git a/components/lib/datatable/DataTable.js b/components/lib/datatable/DataTable.js index c6ba016526..b6e112544a 100644 --- a/components/lib/datatable/DataTable.js +++ b/components/lib/datatable/DataTable.js @@ -1503,9 +1503,9 @@ export const DataTable = React.forwardRef((inProps, ref) => { filter(props.globalFilter, 'global', props.globalFilterMatchMode); } else { // #3819 was filtering but now reset filter state - if (d_filtersState["global"]) { + if (d_filtersState['global']) { let filters = { ...d_filtersState }; - delete filters["global"]; + delete filters['global']; setD_filtersState(filters); onFilterApply(filters); } 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