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: adminforth/documentation/docs/tutorial/03-Customization/04-hooks.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,9 +42,9 @@ When user opens edit page, AdminForth makes a request to the backend to get the
42
42
43
43

44
44
45
-
Practically you can use `show.afterDatasourceResponse` to modify or add some data before it is displayed on the edit page.
45
+
Practically you can use `show.afterDatasourceResponse` to modify or add some data before it is displayed on the edit page. In other words, at this stage you can enrich the data with some additional metadata which might be handy on edit page for custom Vue fields.
46
46
47
-
For example [upload plugin](/docs/tutorial/Plugins/upload/) uses this hook to generate signed preview URL so user can see existing uploaded file preview in form, and at the same time database stores only original file path which might be not accessible without presigned URL.
47
+
For example [upload plugin](/docs/tutorial/Plugins/upload/) uses this hook to generate signed preview URL so user can see existing uploaded file preview in form, and at the same time database stores only original file path which might be not accessible without presigned URL.
48
48
49
49
## Saving data on edit page
50
50
@@ -177,6 +177,28 @@ For example, you can change the way columns value is displayed by changing the v
177
177
}
178
178
```
179
179
180
+
Also you can use this hook to enrich the returned records list with some additional data fields which might be handy for custom Vue components defined in `components.list` or `components.show` for this resource. For example you can use [key-value adapter](/docs/tutorial/Adapters/key-value-adapters/) to get some global configuration values and add them to each record in the list:
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/06-Adapters/07-key-value-adapters.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
description: "Reference page for AdminForth key-value adapters, including RAM, Redis, and LevelDB backends for temporary state, caching, and plugin storage."
2
+
description: "Reference page for prebuilt key-value adapters created by AdminForth team, including simplest RAM Adapter (in-memory, no dependencies but ephemeral), Redis-based adapter, LevelDB - based (requires a mounted volume DevOps), Resource-based (Works on top of a resource persistable with your native SQL/NoSQL database)"
0 commit comments