Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Can we utilize default form fields in custom react components?

default discord avatar
superwafflepuffslast year

I've built a react component that injects at the top of my dashboard and renders some custom charts.



I want to add some <Select /> filters to filter the chart data by and want to use consistent UI components as the rest of the dashboard. However, the form fields seem to be tightly coupled to their collection implementations.



Is there some way to access the lower level components and populate them manually?



Right now i'm trying this:


import { Select } from 'payload/components/forms';

//...
<Select options={[]} />


Can this component be used outside of collections?



ah, I see!



SelectInput

is the underlying component and works as expected.

    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

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