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: components/notion/actions/create-page-from-database/create-page-from-database.mjs
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,14 @@ import NOTION_ICONS from "../../common/notion-icons.mjs";
2
2
importutilsfrom"../../common/utils.mjs";
3
3
importnotionfrom"../../notion.app.mjs";
4
4
importbasefrom"../common/base-page-builder.mjs";
5
+
importpickfrom"lodash-es/pick.js";
5
6
6
7
exportdefault{
7
8
...base,
8
9
key: "notion-create-page-from-database",
9
10
name: "Create Page from Data Source",
10
11
description: "Create a page from a data source. [See the documentation](https://developers.notion.com/reference/post-page)",
11
-
version: "1.0.2",
12
+
version: "1.0.3",
12
13
type: "action",
13
14
props: {
14
15
notion,
@@ -19,13 +20,26 @@ export default {
19
20
],
20
21
label: "Parent Data Source ID",
21
22
description: "Select a parent data source or provide a data source ID",
23
+
reloadProps: true,
22
24
},
23
25
Name: {
24
26
type: "string",
25
27
label: "Name",
26
28
description: "The name of the page. Use this only if the data source has a `title` property named `Name`. Otherwise, use the `Properties` prop below to set the title property.",
27
29
optional: true,
28
30
},
31
+
propertyTypes: {
32
+
propDefinition: [
33
+
notion,
34
+
"propertyTypes",
35
+
(c)=>({
36
+
parentId: c.parentDataSource,
37
+
parentType: "data_source",
38
+
}),
39
+
],
40
+
description: "Select one or more page properties. Willl override properties set in the `Properties` prop below.",
0 commit comments