You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @nandox5, just opened a PR to fix this issue. The required lines are already present in the previous section for the blog-post/list.tsx file and it includes the lines about meta property but they got left out in the next section about the refactoring component.
Describe the bug
https://refine.dev/blog/shadcn-ui/#refine--shadcn-building-a-reusable-datatable--component-with-shadcn
This doc does not seem to work, i followed the instructions and i get an error after implementing the Datatable component.
Uncaught TypeError: Cannot read properties of undefined (reading 'categoryData')
checking the table object from
{
id: "category",
header: "Category",
accessorKey: "category.id",
cell: function render({ getValue, table }) {
const meta = table.options.meta as {
categoryData: GetManyResponse;
};
const category = meta.categoryData?.data?.find(
(item: ICategory) => item.id === getValue()
);
this column section, i can see that table does not have a meta under options object..
is this document outdated?
Steps To Reproduce
Follow the instructions on the documentation.
Expected behavior
should work. instead i get an error and nothing is shown on the page.
Packages
simple-rest and shadcnui
Additional Context
The text was updated successfully, but these errors were encountered: