Custom collection views.Edit component

default discord avatar
inaztm
last month

In the documentation, you give an example of views.List customization, but how to get access to the data in the views.Edit custom component?


It seems that the useField


const { value: title } = useField({ path: 'title' })

and useAllFormFields


const data = useAllFormFields()

hooks do not return field data.


Return always undefined value.



Solved, need wait when isLoading === false and data return title field

    Open the post
    Continue the discussion in Discord
    Like what we're doing?
    Star us on GitHub!

    Star

    Connect with the Payload Community on Discord

    Discord

    online

    Can't find what you're looking for?

    Get help straight from the Payload team with an Enterprise License.