Search code examples
reactjstypescriptant-design-pro

Ant design Form.list usage with pre filled data?


I've been using ant design for a while and needed the Form.list for a feature. I can implement the entire workflow, but can't implement a pre filled form items in the list.

const user = ['a', 'b', 'c']

Can we have 3 form items in Form.list pre filled with the user array as an example? thank you for your help.


Solution

  • Sadly and apparently there is no way to it using the Form.item. You can check out dynamic form api and use it to create your own dynamic fields. I will post my solution for it when i have it. Until then, any feedback are welcome.