-
Notifications
You must be signed in to change notification settings - Fork 932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
customBodyRender bug #915
Comments
Hello @Lilliance. You list your version of this library here as |
Thank you for advice, @gabrielliwerant. I updated library to |
It looks like be using incorrect arguments in the function. Check out the |
When i don't use any args, i have same issue. You can reproduce that, if you pass this render fn:
And this is cell data:
|
I'll need to see an example of your problem with all the (minimal) code necessary to create the issue. Can you create a codesandbox (https://codesandbox.io) and share it here? |
Sure, you can check my example |
Thank you! I can reproduce the problem now. Will take a look. |
Ok, I've got a better handle on this now. I'm downgrading the issue to an "enhancement". Fundamentally, the table isn't set up to use objects the way you are attempting, so the issue is deeper than filters or So the problem with the table is that it's allowing the object to propagate through the code until it blows up. I'm working on a PR that I'll mention here when pushed, which will throw an error earlier in the execution of the code so that you and others can see it and deal with it before it becomes some generic react error that's difficult to trace. |
@gabrielliwerant, thank you for explanation, i appreciate your help! |
@Lilliance That's correct, it looks like you got lucky! I think you would have run into problems eventually. Not your fault, as there were no error messages to help out here, but hopefully the additions will provide something good enough for now. |
P. S. I was partially incorrect, it looks like array data is allowed for cells, which will be automatically concatenated together, unless you use |
Yes, i got it. I converted all object values to string and now everything works fine. :) I thought work with objects save my time with server-side filtering (because i will send entity ids to server), but... :( |
If you need serverside filtering, I have a PR up to add support for it that you might want to take a look at #913. |
Hello!
When i trying to provide
customBodyRender
function in column options its broke filter with that column.Errors heading looks like:
primary
supplied toForwardRef(ListItemText)
, expected a ReactNode."children
supplied toForwardRef(Typography)
, expected a ReactNode."I trying to use this
customBodyRender
function:When i trying to return only
field.name
string, without<span></span>
wrapper all works fine.Also, your example works.
The Column:
A row data:
What i missed?
The text was updated successfully, but these errors were encountered: