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
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/frontend/pluggable-widgets/pluggable-widgets-property-types.md
+23-10Lines changed: 23 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -710,10 +710,6 @@ Then the Studio Pro UI for the property appears like this:
710
710
711
711
The datasource property allows widgets to work with object lists. The client component will receive value prop of type [`ListValue`](/apidocs-mxsdk/apidocs/pluggable-widgets-client-apis-list-values/#listvalue) and may be used with [`action`](#action), [`attribute`](#attribute), [`association`](#association), [`expression`](#expression), [`text template`](#texttemplate), and [`widgets`](#widgets) properties. See [Data Sources](/refguide/data-sources/#list-widgets) for available data source types.
712
712
713
-
{{% alert color="info" %}}
714
-
The ability to link association properties to a data source was introduced in Mendix [9.17](/releasenotes/studio-pro/9.17/).
715
-
{{% /alert %}}
716
-
717
713
If no data source has been configured by the user, any properties that are linked to the datasource property are automatically omitted from the props passed to the client component (even if they are marked as required).
718
714
719
715
{{% alert color="warning" %}}
@@ -722,12 +718,29 @@ Only list datasources are supported, therefore specifying `isList="true"` is req
722
718
723
719
#### XML Attributes
724
720
725
-
| Attribute | Required | Attribute Type | Description |
|`required`| No | Boolean | This decides if the user is required to specify a datasource, `true` by default |
727
+
|`defaultType`| No | String | Default type for the property, supported values are `Database`, `Microflow`, `Nanoflow`, and `Association`|
728
+
|`defaultValue`| No | String | Default value for the property, see [Default Data Sources](#data-source-defaults)|
729
+
730
+
##### Data Source Defaults {#data-source-defaults}
731
+
732
+
{{% alert color="info" %}}
733
+
The `defaultType` and `defaultValue` attributes for datasources were introduced in Mendix [10.16](/releasenotes/studio-pro/10.16/).
734
+
{{% /alert %}}
735
+
736
+
You can use the `defaultType` and `defaultValue` attributes to configure default data sources for your widget. Unless overridden in Studio Pro, the widget will attempt to configure the data source according to its defaults. Both attributes need to be set for the defaults to be applied.
737
+
738
+
The format of `defaultValue` depends on the chosen `defaultType`:
0 commit comments