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: docs-v2/pages/components/api.mdx
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,7 @@ export default {
71
71
version:"",
72
72
description:"",
73
73
props: {},
74
+
asyncadditionalProps(previousPropDefs),
74
75
methods: {},
75
76
hooks: {
76
77
asyncactivate() {},
@@ -92,6 +93,7 @@ export default {
92
93
|`version`|`string`| required | The component version. There are no constraints on the version, but [semantic versioning](https://semver.org/) is required for any components published to the [Pipedream registry](/components/guidelines/). |
93
94
|`description`|`string`| recommended | The description will appear in the Pipedream UI to aid in discovery and to contextualize instantiated components |
94
95
|`props`|`object`| optional |[Props](#props) are custom attributes you can register on a component. When a value is passed to a prop attribute, it becomes a property on that component instance. You can reference these properties in component code using `this` (e.g., `this.propName`). |
96
+
|`additionalProps`|`method`| optional | Defines modifications to make to the props definition when using [Dynamic props](#dynamic-props). |
95
97
|`methods`|`object`| optional | Define component methods for the component instance. They can be referenced via `this` (e.g., `this.methodName()`). |
96
98
|`hooks`|`object`| optional (sources only) |[Hooks](#hooks) are functions that are executed when specific component lifecycle events occur. |
97
99
|`dedupe`|`string`| optional (sources only) | You may specify a [dedupe strategy](#dedupe-strategies) to be applied to emitted events |
@@ -126,6 +128,8 @@ props: {
126
128
label:"",
127
129
description:"",
128
130
options: [], // OR async options() {} to return dynamic options
131
+
useQuery:true||false,
132
+
reloadProps:true||false,
129
133
optional:true||false,
130
134
propDefinition: [],
131
135
default:"",
@@ -145,6 +149,7 @@ props: {
145
149
|`description`|`string`| optional | Displayed near the prop input. Typically used to contextualize the prop or provide instructions to help users input the correct value. Markdown is supported. |
146
150
|`options`|`string[]` or `object[]` or `method`| optional | Provide an array to display options to a user in a drop down menu.<br /> <br />**`[]` Basic usage**<br />Array of strings. E.g.,<br />`['option 1', 'option 2']`<br /> <br />**`object[]` Define Label and Value**<br />`[{ label: 'Label 1', value: 'label1'}, { label: 'Label 2', value: 'label2'}]`<br /> <br />**`method` Dynamic Options**<br />You can generate options dynamically (e.g., based on real-time API requests with pagination). See configuration details below. |
147
151
|`useQuery`|`boolean`| optional | Use in conjunction with **Dynamic Options**. If set to `true`, the prop accepts a real-time query that can be used by the `options` method to obtain results according to that query. |
152
+
|`reloadProps`|`boolean`| optional | Use in conjunction with [Dynamic props](#dynamic-props). If set to `true`, changes made to this property will cause `additionalProps` to be reloaded for the component. Defaults to `false`. |
148
153
|`optional`|`boolean`| optional | Set to `true` to make this prop optional. Defaults to `false`. |
149
154
|`propDefinition`|`[]`| optional | Re-use a prop defined in an app file. When you include a prop definition, the prop will inherit values for all the properties listed here. However, you can override those values by redefining them for a given prop instance. See **propDefinitions** below for usage. |
150
155
|`default`|`string`| optional | Define a default value if the field is not completed. Can only be defined for optional fields (required fields require explicit user input). |
@@ -374,7 +379,7 @@ hasHeaders: {
374
379
},
375
380
```
376
381
377
-
When a user chooses a value for this prop, Pipedream runs the `additionalProps` component method to render props:
382
+
When a user chooses a value for this prop, Pipedream runs the `additionalProps` component method (note, __not__ at `methods.additionalProps`) to render props:
0 commit comments