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
{{ message }}
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.
I figured this would allow me to include my own custom components (in this case a customized input defined as TextField) in the Table, but I get this error and the rows do not render:
The only possible children of <Table> are <Thead>, <Tr>, or one <Tfoot>.
Is there no way to use this with other components at this point?
The text was updated successfully, but these errors were encountered:
the simplest way that comes to mind is getting the entire text content of the component and using that as a string value. if all values can be parsed as float / numeric, then sort / filter as numeric.
I had rows that had to hold array values and then since i didnt use the data prop sorting/filtering didnt work. Since my Tr wrapped my div i used the following for the sorting.
//We have to deconstruct the DIV array that we made
const arraySort = (a, b) => {
const valuesA = a.props.children[0];
const valuesB = b.props.children[0];
if (valuesA.length === 0) {
return 1;
}
if (valuesB.length === 0) {
return -1;
}
//for some reason the array haves empty values with the "real" value
const realA = valuesA[0].props.children.find(v => v !== ' ');
const realB = valuesB[0].props.children.find(v => v !== ' ');
return realA.localeCompare(realB);
};
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I figured this would allow me to include my own custom components (in this case a customized
input
defined asTextField
) in theTable
, but I get this error and the rows do not render:Is there no way to use this with other components at this point?
The text was updated successfully, but these errors were encountered: