ValYouW / jqPropertyGrid

A small property grid in JS to view/edit POJOs
MIT License
57 stars 33 forks source link

Support for Nested Objects and Arrays #24

Open thboomsma opened 8 months ago

thboomsma commented 8 months ago

Hi this is probably more a feature request than in issue.

I've been tweaking around jqPropertyGrid to handle Nested Objects by flattening and unflattening them. It works but when it gets to arrays we need a different strategy and way of handling them. Arrays of objects or values require different handling, is that possible with built in functionality? If not could you please provide some pointers/hookups where and how we could create the support for them?

Thanks Theo

ValYouW commented 8 months ago

You are stretching this little tool way beyond what it was built for... :) Unfortunately I don't have any time to work on it, nor I really remember how it works....

gswilcox01 commented 8 months ago

Not sure it helps, but I commited an example 7 years ago of a customType named "textArea", and it takes in an array of strings, and outputs an array of strings (1 per line from the text area). https://github.com/ValYouW/jqPropertyGrid/commit/753de06c47aefe0a64ec1dab48db59ce3d76eaf9

thboomsma commented 7 months ago

Actually you just provided me with an amazing hook for entering arrays of values/strings/objects as inputs. This allows these arrays to be disregarded by the jsPropgrid and we can add a nested JSON/CSV checker to validate/sanitize inputs ... We do need some sort of label but since it's nested we could use a group header for that instead... thanks alot!! Still think we gotta v2 this tool