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
|
|
@ -68,6 +68,7 @@ This syntax creates a custom variable in the widget that can be read and modifie
|
|||
This allows loading the content of an external file in a property. If used in a `JS{}` of `#{}` block, it will be seen as a string variable containing the raw content of the file. Changes made to the file be applied automatically.
|
||||
|
||||
File paths are resolved in this order:
|
||||
|
||||
- in the session's directory
|
||||
- in theme's directory
|
||||
- in the server's `remote-root` directory if the option is set
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@ This script is called when the widget is created. If the widget has children, it
|
|||
!!! warning "Modifying parent container"
|
||||
Modifying a non-dynamic property on a parent container from this script **will not work**.
|
||||
|
||||
The following variables are available in this context:
|
||||
|
||||
- `value`: widget's value
|
||||
|
||||
### `onValue`
|
||||
|
||||
This script is called when the widget's value updates and when it receives a value.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue