Nice grid! Been looking for a small, light weight, and easy to use jQuery property grid for some time. Like your approach to the object and meta for setting things.
One of my use cases is to have all properties displayed as read only, so I thought using a label would be good for that. I added between your color and default textbox the following:
// If label (for read-only)
} else if (type === 'label') {
valueHTML = '<label for="' + elemId + '">' + value + '</label>';
And then in meta set type='label' which works well. I already have everything I need in the objects, and for this use case all is one group. So I'm wondering if it would maybe be possible for you to add in the initial init a parameter for naming the group and setting all to label/readonly so I wouldn't need to even create a meta in this case.
Maybe something like this which would set all properties to the same type and allow the single group name to be passed?
$("#propertyGrid").jqPropertyGrid(propObj, null, "My group title", "label");
Nice grid! Been looking for a small, light weight, and easy to use jQuery property grid for some time. Like your approach to the object and meta for setting things.
One of my use cases is to have all properties displayed as read only, so I thought using a label would be good for that. I added between your color and default textbox the following:
And then in meta set type='label' which works well. I already have everything I need in the objects, and for this use case all is one group. So I'm wondering if it would maybe be possible for you to add in the initial init a parameter for naming the group and setting all to label/readonly so I wouldn't need to even create a meta in this case.
Maybe something like this which would set all properties to the same type and allow the single group name to be passed?
$("#propertyGrid").jqPropertyGrid(propObj, null, "My group title", "label");