Re-use payload form components in custom field #2388
hatsumatsu
started this conversation in
Feature Requests & Ideas
Replies: 1 comment
-
@hatsumatsu 💯 we are actively overhauling our component library right now to make it significantly more reusable and developer friendly. This is the exact type of problem we're hoping to completely eliminate. You can track the progress in this thread: #293. Feel free to post your ideas or requirements in there as well and we'll be sure to hit them. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm currently trying to build a custom field that shows a select element. When typing in the select's input the options should be populated with results from an external API based on the input value.
My approach so far was promising, just re-using payload's
SelectInput
like this:My idea was to use
react-select
'sonInputChange
prop to get the current input's value, query the API and populateoptions
.Unfortunately payload's
SelectInput
component only exposes a few ofreact-select
's props, so I can not useonInputChange
.Would it be possible to expose more props from react-select? What would be the most efficient approach handling this use case without replicating
SelectInput
?Beta Was this translation helpful? Give feedback.
All reactions