when I scroll, the first items still in the same place
I have an app that renders a list of items inside a ul that has been set to overflow-y scroll but when I scroll the fist items stay in place
// mapping through a list of recipes
showIngList.map((item) => (
<div className="recipe-display" key={item.recipe.url}>
<div className="recipe-des">
/* name of the recipe */
<h2>{item.recipe.label }</h2>
<p>Ingredients:</p>
<ul className="list-group list-group-flush">
/* mapping through the ingredients of a recipe */
{item.recipe.ingredientLines.map((ingredent, key) => (
<li key={key} className="list-group-item">
{ingredent}
</li>
))}
</ul>
<button onClick={closeIngHandler} className="btn btn-danger">
Close
</button>
</div>
</div>
))