Skip to content

Commit 64f937c

Browse files
committed
[sea-orm-pro] editor
1 parent f7978af commit 64f937c

File tree

5 files changed

+58
-0
lines changed

5 files changed

+58
-0
lines changed

sea-orm-pro/docs/01-index.md

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838

3939
4.6 [Delete](04-raw-table-config/06-delete.md)
4040

41+
4.7 [Editor](04-raw-table-config/07-editor.md)
42+
4143
5. Composite Table Config
4244

4345
5.1 [Overview](05-composite-table-config/01-overview.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Editor
2+
3+
![](../../static/img/raw-table-config-table-editor.png#light)
4+
![](../../static/img/raw-table-config-table-editor-dark.png#dark)
5+
6+
## Enable Editor
7+
8+
Enable editor on this database table, this is disabled by default.
9+
10+
## Full Spec
11+
12+
```toml
13+
[editor]
14+
# Enable editor for this table
15+
enable = true
16+
# Title field to be shown
17+
title_field = "address_type"
18+
# Display following columns in sequence from left to right in the table view
19+
fields = [
20+
{
21+
# Display title
22+
title = "ID",
23+
24+
# Name of the SQL column
25+
field = "address_id",
26+
27+
# Column span
28+
span = 8
29+
},
30+
{ field = "rowguid", span = 8 },
31+
{ field = "created_date", span = 8 },
32+
{
33+
field = "address_line1",
34+
35+
span = 12,
36+
37+
# Data type
38+
input_type = "textarea",
39+
40+
# Number of default rows for the textarea
41+
rows = 4
42+
},
43+
{ field = "address_line2", span = 12, input_type = "textarea", rows = 4 },
44+
{ field = "city", span = 6 },
45+
{ field = "state_province", span = 6 },
46+
{ field = "country_region", span = 6 },
47+
{ field = "postal_code", span = 6 },
48+
]
49+
```

sea-orm-pro/docs/05-composite-table-config/02-parent-table.md

+7
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ columns = [
3737
]
3838
all_columns = false
3939

40+
[parent.editor]
41+
enable = true
42+
title_field = "purchase_order_number"
43+
fields = [
44+
# ...
45+
]
46+
4047
[parent.create]
4148
enable = true
4249

Loading
Loading

0 commit comments

Comments
 (0)