Skip to content
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

fix(ui): improve JSON data handling and display #10416

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smoothdvd
Copy link

What?

This PR addresses several issues in the JSONCell component related to data handling and display of JSON field values.

Why?

Since cellData is a JSON object, if it is a large array-like JSON with over 100 elements, it will lead to a "TypeError: t.substring is not a function" when the code cellData.substring(0, 100) is reached and executed, because cellData is of type Array.

How?

validate and JSON.stringify the cellData first, then do text truncation logic

Fixes #
https://discord.com/channels/967097582721572934/1102950643259424828/1325764727334502461

@smoothdvd smoothdvd changed the title fix(ui): Improve JSON data handling and display fix(ui): improve JSON data handling and display Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant