-
Notifications
You must be signed in to change notification settings - Fork 473
Render data in a Material-UI DataGrid using the render prop in ReactiveList #1877
Replies: 1 comment · 7 replies
-
@Diego-Hernandez-Moodys I suppose your problem lies in how you are using the As I can notice you are returning a function signature
use this instead and see
Also, see this example, |
Beta Was this translation helpful? Give feedback.
All reactions
-
I've seen this error before with MUI DataGrid, but it probably doesn't like being rendered in ReactiveList, which is why I think I should go with ReactiveComponent instead. Render error
Console Error (1/3)
Console Error (2/3)
Console Error (3/3)
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Hmm, okay. Let us know if you face any problems with ReactiveComponent. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I'm getting no luck. My console output of the props doesn't show any data despite pointing to the same id in the react
Here's a sandbox with a completely minimal example using the API source from the demo you gave me. I have the react prop pointing to the correct id., but maybe I'm missing something else? https://codesandbox.io/s/reactivecomponent-mui-datagrid-f5783n?file=/src/index.js |
Beta Was this translation helpful? Give feedback.
All reactions
-
The below sandbox has a working version of ReactiveComponent(you can optimize it later on). |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Thanks, I'll open up an issue on MUI's github |
Beta Was this translation helpful? Give feedback.
-
I'm using issue #969 for reference on how to build a table. I'm trying to render the reactivesearch data in a Material-UI DataGrid.
My search is based on a DataPicker with componentID "DateSensor" just like in the tutorial here.
I can certainly get results in the console
However, when I use the render prop, I get an "Warning: Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it." error.
Here's the full code. The collectRowsElastic() just collects the data into an array of json objects with the keys I want. Do non-reactivesearch components play nice with ReactiveList?
Also, the documentation needs to be consolidated somewhere since you have multiple websites that give inconsistent information
If you could also point me to an example that passes all the data to a state I can fetch to treat this as a child component, that would be helpful too. Something like
Beta Was this translation helpful? Give feedback.
All reactions