scripting: onCreate: expose value and call onCreate after default value is applied
This commit is contained in:
parent
6ef1d412f9
commit
5230eb2d4b
6 changed files with 14 additions and 4 deletions
|
|
@ -232,7 +232,7 @@ class Widget extends EventEmitter {
|
|||
widget: this,
|
||||
property: 'onCreate',
|
||||
code: this.getProp('onCreate'),
|
||||
context: {}
|
||||
context: {value: 0}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ class Widget extends EventEmitter {
|
|||
index: index
|
||||
})
|
||||
|
||||
if (this.scripts.onCreate) this.scripts.onCreate.run({}, {sync: true, send: true, onCreate: true})
|
||||
if (this.scripts.onCreate) this.scripts.onCreate.run({value: this.value}, {sync: true, send: true, onCreate: true})
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue