Closed AlexRMU closed 1 year ago
Yes definitely! Thanks for your suggestion. Implementing a table mode is something that I have in mind for a while, I made a little start some time ago, would love to work that out.
What do you mean with "must have a virtual DOM" and "Screw the schemas to this"?
Ah, yes, agree and agree. The Table mode should work smooth for JSON documents of up to 400 MB, like the Tree mode :). And yes, validation and everything should work, as well as editing, sorting, filtering, and everything. I also would like to have the Table mode output changes as JSON Patch, like Tree mode, that is powerful to be able to keep track on changes in the document.
Great news: a first version of table
mode is now published in v0.11.0
🎉 .
You can try it out on https://jsoneditoronline.org (v6.10.0
)
It currently features:
It lacks the following features (I'll implement that in a next iteration):
Feedback would be very welcome @AlexRMU
Thanks for your suggestions, they make sense.
About nested tables: there already is support for nested tables, but they are opened in a modal. We could look into rendering nested tables inline like jsongrid does of course, it's nice when having small, nested arrays!
perhaps you need to use a good ready-made table component
The current table mode is custom made to support large documents: you can smoothly open a 500MB file with 1M rows and edit it. Before implementing the table mode, I did look around for a vanilla or Svelte table component that I could use, but I couldn't find one that fits what I have in mind, and can be tightly integrated so that you can use the same onRenderValue
to customize rendering of values in both table and tree mode, etc.
It would be nice to make a table (grid) mode like on https://jsongrid.com/