You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: guides/v2.2/ui_comp_guide/concepts/ui_comp_uiclass_concept.md
+27-27Lines changed: 27 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -21,41 +21,41 @@ The uiClass class introduces the architecture of UI components through the follo
21
21
22
22
As an example:
23
23
```js
24
-
defaults: {
25
-
myFirstProperty:0,
26
-
mySecondProperty:1
27
-
}
28
-
29
-
//Before executing initConfig method:
30
-
console.log(this.myFirstProperty) // Undefined
31
-
console.log(this.mySecondProperty) // Undefined
32
-
33
-
//After executing initConfig method:
34
-
console.log(this.myFirstProperty) // 0
35
-
console.log(this.mySecondProperty) // 1
24
+
defaults: {
25
+
myFirstProperty:0,
26
+
mySecondProperty:1
27
+
}
28
+
29
+
//Before executing initConfig method:
30
+
console.log(this.myFirstProperty) // Undefined
31
+
console.log(this.mySecondProperty) // Undefined
32
+
33
+
//After executing initConfig method:
34
+
console.log(this.myFirstProperty) // 0
35
+
console.log(this.mySecondProperty) // 1
36
36
```
37
37
38
38
* The `initialize()` method is called during instantiation. It can be used to add custom functionality executed only once, during component instance creation.
39
39
40
40
As an example:
41
41
42
42
```js
43
-
initialize:function () {
44
-
%yourMethodName%();
43
+
initialize:function () {
44
+
%yourMethodName%();
45
45
46
-
returnthis;
47
-
}
46
+
returnthis;
47
+
}
48
48
```
49
49
50
50
* The `_super()` method calls the parent UI component method with the same name as the `_super()` method's caller; if that method does not exists in the parent UI component, then the method tries to find it higher in the inheritance chain.
51
51
As an example:
52
52
53
53
```js
54
-
initialize:function () {
55
-
this._super(); //_super will call parent's `initialize` method here
54
+
initialize:function () {
55
+
this._super(); //_super will call parent's `initialize` method here
56
56
57
-
returnthis;
58
-
}
57
+
returnthis;
58
+
}
59
59
```
60
60
61
61
### Commonly used uiClass properties {#uiclass_properties}
@@ -64,11 +64,11 @@ The `defaults` property declares the list of properties of a UI component's inst
0 commit comments