View properties as object collection/structure?


Is there a way to specify view properties as an object collection/structure?

For example:
var defaultTextProperties = { labelWidth: 60, labelAlign: "right" }

{ view: "text", id: "name", label: "Name", additionalProperties: defaultTextProperties }

I know that elementsConfig can be used in a form to apply to all elements, but I am looking for a way to generally specify certain properties as a structure.

Thank you in advance!


  • edited October 9

    Hello @bhogg2007 ,
    As a solution, you can define the default values for some configuration settings in the defaults of a component. Defaults can be overwritten when you create an instance or use define.
    Please take a look at the following example:

    Please note that defaults property should only be used for static settings, while it is better to work with data either after initialization.

    The feature is described in the related docs chapter

  • Thank you!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!