DSingh0304 commented on issue #2986:
URL: 
https://github.com/apache/apisix-dashboard/issues/2986#issuecomment-3709078154

   Hi @Baoyuantop 
   
   I've created a working demo as requested. Here's the PR:
   
   **PR:** #3274 
   
   ### What's implemented:
   
   1. **SchemaForm component** that renders forms from JSON Schema
   2. **`oneOf` support** - Conditional field groups (e.g., OAuth vs API Key)
   3. **`dependencies` support** - Conditional fields based on other values 
(e.g., Redis config when storage=redis)
   4. **Demo page** at `/schema_form_demo` to test the functionality
   
   ### Key highlights:
   
   - **Zero new dependencies** - Reuses existing `FormItem*` components 
(TextInput, Select, Switch, NumberInput)
   - **Uses React Hook Form's `useWatch`** for conditional rendering (no 
additional state management)
   
   ### How to test:
   
   1. Checkout the PR branch
   2. Run `pnpm dev`
   3. Visit `http://localhost:5173/ui/schema_form_demo`
   4. Try selecting different auth types and storage types to see conditional 
fields appear/disappear
   
   Looking forward to your feedback! 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to