Skip to content

Commit 95d40aa

Browse files
committed
outputs
1 parent fd2dae5 commit 95d40aa

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

website/docs/packages/reference/ui-module-instance.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,42 @@ You can bind static values, widget outputs, query results, or app/user data into
3737
```
3838

3939

40-
</dd>
40+
</dd>
41+
42+
#### Outputs
43+
44+
<dd>
45+
46+
Allows you to access dynamic values from the UI Module Instance in your parent application. Outputs listed at the instance level are automatically generated based on the Outputs defined when the UI Module was created.
47+
48+
Outputs enable you to retrieve internal module state, computed values, or processing results without needing to understand the module's internal implementation.
49+
50+
**Accessing Module Outputs**
51+
52+
Module outputs can be accessed directly using the module instance name:
53+
54+
```javascript
55+
{{ModuleInstanceName.outputName}}
56+
```
57+
58+
*Example:* If you want to display data from a module in a Table widget on your application:
59+
60+
```javascript
61+
// In your Table widget's Data property:
62+
{{DataModule1.tableData}}
63+
```
64+
65+
This allows you to populate application tables with data processed or filtered inside your module without exposing the internal implementation details.
66+
67+
*Example:* To use an authentication token generated by a login module in your API calls:
68+
69+
```javascript
70+
// In an API Header configuration
71+
{
72+
"Authorization": "Bearer {{LoginModule1.authToken}}"
73+
}
74+
```
75+
76+
By effectively using module outputs, you can build applications from reusable, encapsulated components while maintaining clean integration between them.
77+
78+
</dd>

website/docs/packages/reference/ui-module.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,37 @@ Inputs can be accessed using the same syntax across widgets, queries, and JavaSc
5757

5858
</dd>
5959

60+
#### Outputs
61+
62+
<dd>
63+
64+
Outputs allow you to pass dynamic values from the UI Module back to the parent application. They enable modules to share results, state changes, or computed values with the consuming application.
65+
66+
Each Output has:
67+
68+
- **Name:** Used to reference the value in the parent application.
69+
- **Value:** The internal module data, state, or computed result you want to expose.
70+
71+
**Accessing Outputs**
72+
73+
When a UI Module is added to an application, its outputs become available through the module instance name:
74+
75+
```javascript
76+
{{ModuleName.outputName}}
77+
```
78+
79+
*Example:* If you have a login module that generates an authentication token, you can access it in the parent app using `{{LoginModule.authToken}}` for subsequent API calls.
80+
81+
*Example:* To display data from a module in a Table widget on your application:
82+
83+
```javascript
84+
// In your Table widget's Data property:
85+
{{DataModule.tableData}}
86+
```
87+
88+
This allows you to populate application tables with data processed or filtered inside your module without exposing the internal implementation details.
89+
90+
</dd>
6091

6192
#### Visible `boolean`
6293

0 commit comments

Comments
 (0)