Danyon-Talbot / P1-ScrollCinema

1 stars 1 forks source link

BugFix, New Searches No Longer Append to Previous Searches #48

Closed Danyon-Talbot closed 1 year ago

Danyon-Talbot commented 1 year ago

This PR is a fixes a bug with the Dynamic HTML added by JS.

On pressing the "searchBtn" again, generated suggestions would append to the bottom of previously generated suggestions.

The Dynamic HTML is now cleared initially when the "searchBtn" is clicked, clearing all previously loaded suggestions before generating new ones.

NOTE: This is for the "Stop the Doom Scroll" button on the search form only. Once functionality has been added to the "Generate More Suggestions" button, this may need to be altered for both to function independently.