ValYouW / jqPropertyGrid

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

Support Expand/Collapse mode #13

Closed HamedFathi closed 6 years ago

HamedFathi commented 7 years ago

Hi

I added some codes to support Expand/Collapse mode ;)

ValYouW commented 7 years ago

Nice! If I understand correctly you added it as the default behavior, this will break the behavior for currently users, can you make it optional ? Thx.

HamedFathi commented 7 years ago

@ValYouW

As you wish ! $('#propGrid').jqPropertyGrid(theObj, theMeta,true); // isCollapsible : true

Check it please

ValYouW commented 7 years ago

Hey,

Looking at the added option I thought it would be a good time to introduce an options object, so in the future we could add more options without breaking the API. So I just did it quickly and now there is an options object which has currently only the metadata parameter in it, so go ahead and feel free to add your isCollapsible option (default: false). (You will need to update your fork with the latest changes first).

Also, please read the contribution guidelines, it seems that jscs is failing, and don't forget to update the README so others will know about this feature! If you have issues with jscs let me know and I'll take a look (note that in the project root there is a .editorconfig file, so if your editor supports this it will be easier for you to use this file).

Thx!