Aug 29, 2022 06:19 PM
Im looking to create an extension that shows dropdowns for various fields in my base, but I don’t know how to make the dropdowns appear within the extension. I’ve tried returning the select field as well as using it with a FormField but neither approach works. I’m unsure as to how to make the dropdowns appear in the extension
Aug 29, 2022 09:36 PM
Based on the snippet of code you have, it looks like you put the select component inside a function, and then you are trying to insert that function inside the return of your main component. But you are putting the function itself, and not calling the function so you don’t actually get the return value of the function.
Try putting the select component directly inside the main return. You may also need to adjust how you setup the useState hook.
Aug 30, 2022 05:16 AM
To clarify @kuovonne’s first suggestion, try changing this:
{FormFieldExample}
…to this, which would be an actual JSX element instead of just a reference to the defined function:
<FormFieldExample />
Her other recommendation about moving the FormField
and Select
elements inside of the Box
element would also solve the problem.