added support for :excerpt(max, withEllipsis?) fields modifier

This commit is contained in:
Gani Georgiev
2023-09-18 15:16:06 +03:00
parent f3bcd7d3df
commit 6013d14bc6
5 changed files with 434 additions and 29 deletions
+8
View File
@@ -2,6 +2,14 @@
- Added Patreon OAuth2 provider ([#3323](https://github.com/pocketbase/pocketbase/pull/3323); thanks @ghostdevv).
- (@todo docs) Added support for `:excerpt(max, withEllipsis?)` `fields` modifier that will return a short plain text version of any string value (html tags are stripped).
This could be used to minimize the downloaded json data when listing records with large `editor` html values.
```js
await pb.collection("example").getList(1, 20, {
"fields": "*,description:excerpt(100)"
})
```
## v0.18.6