Skip to main content

setProperties()

allows changing available configuration attributes of the control dynamically

setProperties(properties: object): void;

Parameters:

  • properties: object - an object with the available attributes of the control and their new values

Example

form.getItem("avatar").setProperties({
labelWidth: "140px",
labelPosition: "top"
});

info

The method invokes the afterChangeProperties and beforeChangeProperties events.

It is possible to change values of the following configuration attributes of the Avatar control:

{
css: string,
width: string | number | "content",
height: string | number | "content",
padding: string | number,
label: string,
labelWidth: string | number,
labelPosition: "left" | "top",
hiddenLabel: boolean,
helpMessage: string
required: boolean,
preMessage: string,
successMessage: string,
errorMessage: string,
validation: (value: object) => boolean,
readOnly: boolean,
removeIcon: boolean,
size: "small" | "medium" | "large" | number,
circle: boolean,
alt: string,
icon: string,
placeholder: string,
preview: string,
accept: string,
target: string
fieldName: string,
autosend: boolean,
params: { [key: string]: any },
headerParams: { [key: string]: any },
updateFromResponse: boolean
}

You will find the description of these properties here.