mardi 30 juin 2020

Ant Design Collapse - close on button

I'm a beginner user of Ant Design and I've encountered this problem while using Collapse and Form from Ant Design library.

I've set up my page where the form to add new items is in the collapse and there is a list of items below the Collapse.

<Collapse>
  <Panel header="Add New"> 
     <Form />
  </Panel>
<Collapse>
<List/>

The item is successfully added to the list outside of the collapse, but the user has to close the collapse by pressing on the panel header. I want the collapse to close automatically when they press the submit button on the form inside Collapse.

Is there any way to make this happen?

Thank you in advance.




Aucun commentaire:

Enregistrer un commentaire