ValYouW / jqPropertyGrid

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

Callback in Object properties does not fire #23

Closed thboomsma closed 8 months ago

thboomsma commented 8 months ago

In your example you have a callback function. I have been trying to get callbacks working on each changed property to create a "live view" of changes in a control.

What am I missing or is this my environment? Chrome latest version.

PS: Awesome lightweight tool.. love it even 8 years since its inception I still use it Cheers T

ValYouW commented 8 months ago

Hi, Wow, I actually started working on it 10 years ago :) I updated the demo codepen to include handling of the callback prop, you can see it working here.

Note though that I am using jquery 2.1.3 while the current jquery is 3.7.1, so I really don't know if this little tool will work with the latest jquery....

thboomsma commented 8 months ago

I can confirm that the callback works, even with the latest JQuery version. I was flattening a nested Configuration object and loading it with path.keyname:value which was accepted by the UI but obviously not by the callback handler. I changed the divider to "_" and all works fine now What I am trying to create is jqPropertyGrid support for a NestedObject config by creating group headers for each parent path and loading the end-points in these groups .. any pointers for that?