0

I'm using ReactiveSearch (great Search UI library!) and am trying to figure out how I can just show a ample of a text article in the ReactiveList search results. Currently it shows the whole article but I just want the first 250 words or so to be displayed.

enter image description here

I just want say the first 250 words of that. Is that possible with ReactiveList? If so, how can I go about doing that or is there a feature o setting that I'm missing with ReactiveSearch?

This is the simple line that displays it currently:

<p className="card-text">{data.Text}</p>
user3125823
  • 1,846
  • 2
  • 18
  • 46

1 Answers1

0

It is possible to truncate the text after a few lines. But ReactiveSearch doesn't support this feature on the library level.

You can achieve this by using the package called react-truncate. You can read the documentation here.

Hope this helps!

Yash Joshi
  • 2,586
  • 1
  • 9
  • 18