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
As I understand to avoid this error I must convert my fields and rows objects to JSON string before pass it to data-grid. When I wrap this objects with JSON.stringify like this:
this error is gone and evrething is OK. But from my point of view this approach is very strange that I have to convert explicitly my objects to json to avoid JS errors. At least I have never faced this in others component librartes.
But the next problem occurs when I add HTMLCell to my data-grid:
hi @kolianovich ! stringify looks weird. As I see here in docs, where are limitations of using Scale with React https://telekom.github.io/scale/?path=/docs/setup-info-scale-and-react--page and the one with array as props described as well. You should use some proxy to go over this limitations, e.g. @telekom/scale-components-react, as described in article.
PS the issue is old, maybe you could tell how you managed it at the end?
Scale Version
^3.0.0-beta.137
Framework and version
Vite. React+TS+SWC template.
React version: 18.2.14.
Scale without react wrapper
Hello! I started with Data Grid in my react project and faced with issues at the beginning.
First of all I was confused with error when I tried to reproduce in React sample from documentation:
Here is my React component:
When I run it I get the next JS error:
As I understand to avoid this error I must convert my fields and rows objects to JSON string before pass it to data-grid. When I wrap this objects with JSON.stringify like this:
const rows = JSON.stringify([
[1, 'John', '12:30'],
[2, 'Mary', '2:12'],
[3, 'Patek', '16:01'],
[4, 'Heidi', '3:15'],
[5, 'Muhammad', '21:45']
]);
this error is gone and evrething is OK. But from my point of view this approach is very strange that I have to convert explicitly my objects to json to avoid JS errors. At least I have never faced this in others component librartes.
But the next problem occurs when I add HTMLCell to my data-grid:
In this case I receive the next JS error:
As result I am not able to create simple data-grid with HTML Cell on React. Could you please to support me and explain what is wrong with my code?
Thanks a lot!
The text was updated successfully, but these errors were encountered: