Patrik
678ba6cdcc
docs: adds examples and descriptions to field hook docs ( #4448 )
2023-12-11 16:53:02 -05:00
Hulpoi George-Valentin
d6826f792c
docs: wrong import for collections#beforeValidate ( #3863 )
2023-10-25 11:38:26 +02:00
Alessio Gravili
f6adbae0c7
feat: collection, global and field props for hooks, fix request context initialization, add context to global hooks ( #3780 )
...
* feat: pass collection, global and field props to collection, global and field hooks - where applicable
* fix: initial request context not set for all operations
* chore: add tests which check the collection prop for collection hooks
* feat: add context to props of global hooks
* chore: add global tests for global and field props
* chore: int tests: use JSON instead of object hashes
2023-10-21 11:40:57 +02:00
Alessio Gravili
ae7d6f97d2
chore: formatting and linting ( #3261 )
...
* chore: lint packages/payload
* chore: lint packages/db-postgres
* chore: lint packages/db-mongodb
* chore: update eslintrc exclusion rules
* chore: update eslintrc exclusion rules
* chore: lint misc files
* chore: run prettier through packages
* chore: run eslint on payload again
* chore: prettier misc files
* chore: prettier docs
2023-09-01 17:39:44 +02:00
Alessio Gravili
9467074fb9
chore: update 2.0 branch from master ( #3207 )
...
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com >
Co-authored-by: Alessio Gravili <alessio@gravili.de >
Co-authored-by: PatrikKozak <patrik@trbl.design >
Co-authored-by: Lucas Blancas <lablancas@gmail.com >
Co-authored-by: Stef Gootzen <37367280+stefgootzen@users.noreply.github.com >
Co-authored-by: Jarrod Flesch <30633324+JarrodMFlesch@users.noreply.github.com >
Co-authored-by: Jessica Chowdhury <67977755+JessChowdhury@users.noreply.github.com >
Co-authored-by: PatrikKozak <35232443+PatrikKozak@users.noreply.github.com >
Co-authored-by: Greg Willard <Wickett06@gmail.com >
Co-authored-by: James Mikrut <james@payloadcms.com >
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com >
Co-authored-by: Elliot DeNolf <denolfe@gmail.com >
fix: WhereBuilder component does not accept all valid Where queries (#3087 )
fix: passes in height to resizeOptions upload option to allow height resize (#3171 )
2023-08-22 16:04:50 -04:00
Alessio Gravili
67ba131cc6
feat: ability to add context to payload's request object ( #2796 )
...
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com >
2023-07-26 09:07:49 -04:00
Quentin Beauperin
8bdbd6b073
docs: fix global hooks intro anchor links ( #2695 )
2023-05-23 09:31:22 -04:00
Harrison-Blair
13179a9498
chore: misc documentation updates ( #2589 )
...
* chore: ensures example configs are being exported when necessary
* chore: adds note regarding updating of hidden fields
---------
Co-authored-by: Jessica Boezwinkle <jessica@trbl.design >
2023-05-01 16:28:13 -04:00
Alessio Gravili
b76c25c9e7
docs: explain lifecycle of validate & beforeValida
...
Caused confusion here: https://discord.com/channels/967097582721572934/1091785894136139808/1092821186959921193
The initial expectation is that beforeValidate runs before any validation happens. However, it seems that client-side validation happens first nonetheless.
Please do check if this is 100% correct before merging.
2023-04-04 17:21:54 +02:00
James
789537cc8c
docs: previousValue in afterChange field hook, fixes #2383
2023-03-27 16:28:43 -04:00
Nut Pinyo
32b8f46bf2
docs: field hook example configuration ( #1329 )
2022-11-11 04:19:18 -08:00
James
0591dfd05b
chore: typo
2022-10-24 12:18:03 -04:00
Daniel Söderling
09d793926d
feat: added beforeLogin hook ( #1289 )
2022-10-24 12:05:12 -04:00
Elliot DeNolf
d5ccd45b53
Ability to get the "previous" state in the AfterChange Hook ( #1115 )
...
Co-authored-by: Alessio Gravili <alessio@bonfireleads.com >
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com >
2022-09-12 15:48:50 -07:00
James
21eb19edd1
chore: further refinements
2022-09-11 20:57:30 -07:00
Elliot DeNolf
1ed867ce0c
docs: update examples with ts types
2022-08-23 11:43:24 -04:00
Petre Tudor
63519a8f54
docs: missing word ( #909 )
...
add `wait` in `...the second hook will wait for the first to complete before it starts.`
2022-08-10 07:59:52 -04:00
Dan Ribbens
8d550d411e
docs: update collection hooks
2022-07-09 19:57:58 -04:00
Dan Ribbens
4055908bc8
feat: add afterMe afterLogout and afterRefresh
2022-07-09 19:29:00 -04:00
James
b3832e21c9
feat: exposes findMany argument to afterRead hooks to discern between find and findByID
2022-05-02 13:38:13 -04:00
John Beene
801b20ae75
Update fields.mdx ( #509 )
...
Fix destructuring of args inside exampleFieldHook function
2022-04-07 05:37:04 -04:00
James
8e23a24f34
feat: #458 , provides field hooks with sibling data
2022-03-01 18:57:17 -05:00
James
77a208fff7
docs: typescript
2021-11-26 17:10:01 -05:00
Dan Ribbens
d12bb5043a
docs: fix links in collection hooks
2021-09-13 12:17:25 -04:00
Ontopic
f9906e1cdc
docs: fix afterChange example
2021-04-27 09:49:15 -04:00
Elliot DeNolf
b383eb65c6
feat: autolabel fields when label is omitted ( #42 )
...
* feat: autolabel fields when omitted
* feat: handle autolabel in graphql mutation build
* feat: autolabel blocks
* test: add required slug field to blocks
* feat: handle graphql names when label is false
* feat: adds relationship field to test searchable input
* feat: handle block cell type labeling pluralization
* docs: remove all explicit labeling, no longer needed
* fix: falsey column labels, allows false array labels
* fix: client tests
* fix: auto-labels globals
* docs: globals auto-labeling and hooks clarification
* fix; proper object type naming
Co-authored-by: James <james@trbl.design >
2021-04-16 22:37:08 -04:00
Elliot DeNolf
4ee4fae53b
docs: remove incorrect code tags
2021-04-16 18:37:20 -04:00
James
39b30da10f
docs: corrections to field hooks
2021-03-14 12:59:12 -04:00
James
4de5605931
feat: removes requirement of returning value from field hooks
2021-02-27 20:14:41 -05:00
Jessica Boezwinkle
1ed189cfb9
fix: reverts ESLint syntax changes to mdx files
2021-02-04 11:36:09 -05:00
Jessica Boezwinkle
da61feb73b
feat: adds meta descriptions to docs
2021-02-04 11:04:18 -05:00
James
2139eb410f
feat: auto-removes verificationToken upon manual user verify
2021-01-22 17:13:27 -05:00
Elliot DeNolf
0575ab8125
docs: add desc and keywords
2021-01-09 10:32:22 -05:00
James
2b37bfd93e
docs: lowercases dir names
2021-01-06 08:37:29 -05:00