title: How to toggle antd Typography.Paragraph ellipsis
body: <p>I am using the <code>&lt;Typography.Paragraph&gt;</code> component to display the description of some items in a list. I want to limit the number of rows in the description to 2. </p>
  
  <p>Now I can use the <code>ellipsis</code> prop for the <code>&lt;Typography.Paragraph&gt;</code> to limit the description to only display 2 lines and set it to be expandable. However, I cannot seem to find a way to collapse the text back to just 2 rows with an ellipsis <code>(...)</code></p>
  
  <p>This is a snippet of my current code.</p>
  
  <pre class="lang-js prettyprint-override"><code>const listOfLongText = [.....];
  
  listOfLongText.map((text,i) =&gt; {
      &lt;Paragraph ellipsis={{ rows: 2, expandable: true }}&gt; 
          {text}
      &lt;/Paragraph&gt;
  })
  </code></pre>
  
  <p>I know about the <code>onExpand</code> callback for the <code>ellipsis</code> prop of <code>Paragraph</code> but not sure how to get the toggle between expand and collapse functionality using <code>onExpand</code></p>
  
  <p>The <code>&lt;Typography.Paragraph&gt;</code> API is defined <a href="https://ant.design/components/typography/#Typography.Paragraph" rel="nofollow noreferrer">here</a></p>
  
  <p><br>If you need more information, drop a comment and I will provide it.</p>