Update admin components from hooks

default discord avatar
kulczy
2 weeks ago
1

hi there, i call external api from the 'beforeChange' hook, and i would like to update admin panel to display current status of this operation, something like "syncing with the API", "syncing complete", somewhere in header or sidebar. Could anyone give any tips on how to go about this?

  • default discord avatar
    thisisnotchris
    last week

    @kulczy Morning! You could start by creating a custom Admin Component. This will allow you to add it somewhere that makes sense. The component would make a request to the external data and report status (loading indicator?). This is how I see it working, but others might have better solutions.

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.