Skip to content

Commit

Permalink
release v2 beta 3 - fix accessorFns
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed May 12, 2024
1 parent e6bc3f9 commit 0f41733
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion packages/mantine-react-table/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"license": "MIT",
"name": "mantine-react-table",
"description": "A fully featured Mantine implementation of TanStack React Table V8, written from the ground up in TypeScript.",
Expand Down
8 changes: 0 additions & 8 deletions packages/mantine-react-table/src/utils/column.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,6 @@ export const prepareColumns = <TData extends MRT_RowData>({
...columnDef,
};
}
if (columnDef?.accessorFn !== undefined) {
// If there is an accessorFn defined, make sure not to call it if the table is loading
const originalAccessorFn = columnDef.accessorFn;
columnDef.accessorFn = (...args) =>
!tableOptions?.state?.isLoading && !tableOptions?.state?.showSkeletons
? originalAccessorFn(...args)
: undefined;
}
return columnDef;
}) as MRT_DefinedColumnDef<TData>[];
};
Expand Down

0 comments on commit 0f41733

Please sign in to comment.