Franco-Henriquez / live-pokedex

School project that showcases use of REST API calls, trainer registration, mysql connectivity and API creation among other features to help scan pokemon cards or retrieve pokemon data.
0 stars 0 forks source link

Dashboard search history entries appear on page reload only #2

Open Franco-Henriquez opened 11 months ago

Franco-Henriquez commented 11 months ago

This is normal, as the controller fetches the information to pass on to the rendered page. What we want is for the search entries to repopulate or fetch new info when the pokemon form is submitted.

Solution #1: With ajax or java, edit the dom to add the additional entries

Solution #2: From the back end, .get() the most recent pokemonHistorySearch list and resend that to either ajax

Solution #3: The button that takes the user to the dashboard could simply be a link to /dashboard or /dashboard?loadId=1 if it's only dashboard then just reload the page, but the reloading may break the magic of a seamless and smooth transition.

on a similar note, maybe make a loading div to show page load status.

Franco-Henriquez commented 11 months ago

Note* At the moment as a temporary workaround, an anchor tag has been placed to take the user to the default /dashboard.