Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to get all master objects from current app in an extension and put them into a dropdown menu in property panel on right hand side. The challenge is I can get the object list by using backend API but with async mode, which means when I define the structure of the property panel, the object list hasn't been sent back yet. Question is how do I get that updated later? Or does property panel accepts promise as definition? Thanks!
I think I found the solution in help manual. The option accepts promise items: { settings: { uses: "settings", items: { MyDropdownProp: { type: "string", component: "dropdown", label: "Data source", ref: "myproperties.datasource", options: function() { return $.get("datasource.php").then(function(items){ return items.map(function(item){ return { value:item.toLowerCase(), label:item }; }); }); }
I think I found the solution in help manual. The option accepts promise items: { settings: { uses: "settings", items: { MyDropdownProp: { type: "string", component: "dropdown", label: "Data source", ref: "myproperties.datasource", options: function() { return $.get("datasource.php").then(function(items){ return items.map(function(item){ return { value:item.toLowerCase(), label:item }; }); }); }